Class ByteUtil.ByteStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.healthmarketscience.jackcess.impl.ByteUtil.ByteStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Enclosing class:
- ByteUtil
public static class ByteUtil.ByteStream extends OutputStream
Utility byte stream similar to ByteArrayOutputStream but with extended accessibility to the bytes.
-
-
Constructor Summary
Constructors Constructor Description ByteStream()ByteStream(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byteget(int offset)byte[]getBytes()intgetLength()voidreset()voidset(int offset, byte b)voidsetBits(int offset, byte b)voidskip(int n)byte[]toByteArray()voidtrimTrailing(byte minTrimCode, byte maxTrimCode)voidwrite(byte[] b)voidwrite(byte[] b, int offset, int length)voidwrite(int b)voidwriteFill(int length, byte b)voidwriteTo(ByteUtil.ByteStream out)-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream
-
-
-
-
Method Detail
-
getLength
public int getLength()
-
getBytes
public byte[] getBytes()
-
write
public void write(int b)
- Specified by:
writein classOutputStream
-
write
public void write(byte[] b)
- Overrides:
writein classOutputStream
-
write
public void write(byte[] b, int offset, int length)- Overrides:
writein classOutputStream
-
get
public byte get(int offset)
-
set
public void set(int offset, byte b)
-
setBits
public void setBits(int offset, byte b)
-
writeFill
public void writeFill(int length, byte b)
-
skip
public void skip(int n)
-
writeTo
public void writeTo(ByteUtil.ByteStream out)
-
toByteArray
public byte[] toByteArray()
-
reset
public void reset()
-
trimTrailing
public void trimTrailing(byte minTrimCode, byte maxTrimCode)
-
-