com.healthmarketscience.jackcess
Class ByteUtil.ByteStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.healthmarketscience.jackcess.ByteUtil.ByteStream
All Implemented Interfaces:
Closeable, Flushable
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
ByteUtil.ByteStream()
           
ByteUtil.ByteStream(int capacity)
           
 
Method Summary
 byte get(int offset)
           
 byte[] getBytes()
           
 int getLength()
           
 void reset()
           
 void set(int offset, byte b)
           
 void skip(int n)
           
 byte[] toByteArray()
           
 void trimTrailing(byte minTrimCode, byte maxTrimCode)
           
 void write(byte[] b)
           
 void write(byte[] b, int offset, int length)
           
 void write(int b)
           
 void writeFill(int length, byte b)
           
 void writeTo(ByteUtil.ByteStream out)
           
 
Methods inherited from class java.io.OutputStream
close, flush
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteUtil.ByteStream

public ByteUtil.ByteStream()

ByteUtil.ByteStream

public ByteUtil.ByteStream(int capacity)
Method Detail

getLength

public int getLength()

getBytes

public byte[] getBytes()

write

public void write(int b)
Specified by:
write in class OutputStream

write

public void write(byte[] b)
Overrides:
write in class OutputStream

write

public void write(byte[] b,
                  int offset,
                  int length)
Overrides:
write in class OutputStream

get

public byte get(int offset)

set

public void set(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)


Copyright © 2005-2013 Health Market Science. All Rights Reserved.