Package org.apache.qpid.protonj2.buffer
Class ProtonBufferInputStream
java.lang.Object
java.io.InputStream
org.apache.qpid.protonj2.buffer.ProtonBufferInputStream
- All Implemented Interfaces:
- Closeable,- DataInput,- AutoCloseable
An InputStream that can be used to adapt a 
ProtonBuffer for use in the
 standard streams API. This stream wrapper assumes ownership of the provided stream
 and will close it upon a call to the close() method.- 
Constructor SummaryConstructorsConstructorDescriptionProtonBufferInputStream(ProtonBuffer buffer) Creates a newInputStreaminstance that wraps the givenProtonBufferand assumes ownership.
- 
Method SummaryModifier and TypeMethodDescriptionintvoidclose()intvoidmark(int readlimit) booleanintread()intread(byte[] b, int off, int len) booleanbytereadByte()charreadChar()doublefloatvoidreadFully(byte[] target) voidreadFully(byte[] target, int offset, int length) intreadInt()readLine()longreadLong()shortintintreadUTF()voidreset()longskip(long skipAmount) intskipBytes(int skipAmount) Methods inherited from class java.io.InputStreamnullInputStream, read, readAllBytes, readNBytes, readNBytes, transferTo
- 
Constructor Details- 
ProtonBufferInputStreamCreates a newInputStreaminstance that wraps the givenProtonBufferand assumes ownership.- Parameters:
- buffer- The- ProtonBufferthat this- InputStreamwill read from.
 
 
- 
- 
Method Details- 
getBytesReadpublic int getBytesRead()- Returns:
- a running total of the number of bytes that has been read from this InputStream.
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Throws:
- IOException
 
- 
available- Overrides:
- availablein class- InputStream
- Throws:
- IOException
 
- 
markpublic void mark(int readlimit) - Overrides:
- markin class- InputStream
 
- 
reset- Overrides:
- resetin class- InputStream
- Throws:
- IOException
 
- 
markSupportedpublic boolean markSupported()- Overrides:
- markSupportedin class- InputStream
 
- 
read- Specified by:
- readin class- InputStream
- Throws:
- IOException
 
- 
read- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
- 
skip- Overrides:
- skipin class- InputStream
- Throws:
- IOException
 
- 
skipBytes- Specified by:
- skipBytesin interface- DataInput
- Throws:
- IOException
 
- 
readFully- Specified by:
- readFullyin interface- DataInput
- Throws:
- IOException
 
- 
readFully- Specified by:
- readFullyin interface- DataInput
- Throws:
- IOException
 
- 
readBoolean- Specified by:
- readBooleanin interface- DataInput
- Throws:
- IOException
 
- 
readByte- Specified by:
- readBytein interface- DataInput
- Throws:
- IOException
 
- 
readUnsignedByte- Specified by:
- readUnsignedBytein interface- DataInput
- Throws:
- IOException
 
- 
readShort- Specified by:
- readShortin interface- DataInput
- Throws:
- IOException
 
- 
readUnsignedShort- Specified by:
- readUnsignedShortin interface- DataInput
- Throws:
- IOException
 
- 
readChar- Specified by:
- readCharin interface- DataInput
- Throws:
- IOException
 
- 
readInt- Specified by:
- readIntin interface- DataInput
- Throws:
- IOException
 
- 
readLong- Specified by:
- readLongin interface- DataInput
- Throws:
- IOException
 
- 
readFloat- Specified by:
- readFloatin interface- DataInput
- Throws:
- IOException
 
- 
readDouble- Specified by:
- readDoublein interface- DataInput
- Throws:
- IOException
 
- 
readLine- Specified by:
- readLinein interface- DataInput
- Throws:
- IOException
 
- 
readUTF- Specified by:
- readUTFin interface- DataInput
- Throws:
- IOException
 
 
-