com.tc.io
Interface TCByteBufferInput

All Superinterfaces:
java.io.DataInput, TCDataInput

public interface TCByteBufferInput
extends TCDataInput


Nested Class Summary
static interface TCByteBufferInput.Mark
           
 
Method Summary
 int available()
           
 void close()
           
 TCByteBufferInput duplicate()
          Duplicate this stream.
 TCByteBufferInput duplicateAndLimit(int limit)
          Effectively the same thing as calling duplicate().limit(int), but potentially creating far less garbage (depending on the size difference between the original stream and the slice you want)
 int getTotalLength()
           
 TCDataInput limit(int limit)
          Artificially limit the length of this input stream starting at the current read position.
 TCByteBufferInput.Mark mark()
          This is a TC special version of mark() to be used in conjunction with tcReset()...We should eventually implement the general purpose mark(int) method as specified by InputStream.
 void mark(int readlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 void reset()
           
 long skip(long skip)
           
 void tcReset(TCByteBufferInput.Mark m)
          Reset this input stream to the position recorded by the mark that is passed an input parameter.
 TCByteBuffer[] toArray()
           
 TCByteBuffer[] toArray(TCByteBufferInput.Mark start, TCByteBufferInput.Mark end)
           
 
Methods inherited from interface com.tc.io.TCDataInput
read, readString
 
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
 

Method Detail

duplicate

TCByteBufferInput duplicate()
Duplicate this stream. The resulting stream will share data with the source stream (ie. no copying), but the two streams will have independent read positions. The read position of the result stream will initially be the same as the source stream


duplicateAndLimit

TCByteBufferInput duplicateAndLimit(int limit)
Effectively the same thing as calling duplicate().limit(int), but potentially creating far less garbage (depending on the size difference between the original stream and the slice you want)


toArray

TCByteBuffer[] toArray()

toArray

TCByteBuffer[] toArray(TCByteBufferInput.Mark start,
                       TCByteBufferInput.Mark end)

limit

TCDataInput limit(int limit)
Artificially limit the length of this input stream starting at the current read position. This operation is destructive to the stream contents (ie. data trimmed off by setting limit can never be read with this stream).


getTotalLength

int getTotalLength()

available

int available()

close

void close()

mark

void mark(int readlimit)

mark

TCByteBufferInput.Mark mark()
This is a TC special version of mark() to be used in conjunction with tcReset()...We should eventually implement the general purpose mark(int) method as specified by InputStream. NOTE: It has some unusual semantics that make it a little trickier to implement (in our case) than you might think (specifically the readLimit field)


markSupported

boolean markSupported()

read

int read(byte[] b)

read

int read()

reset

void reset()

tcReset

void tcReset(TCByteBufferInput.Mark m)
Reset this input stream to the position recorded by the mark that is passed an input parameter.

Throws:
java.lang.IllegalArgumentException - if m is null or if it was not created against this stream.

skip

long skip(long skip)


Copyright © 2010 Terracotta, Inc.. All Rights Reserved.