Package org.apache.activemq.util
Class ByteArrayInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.activemq.util.ByteArrayInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ByteArrayInputStream extends InputStream
Very similar to the java.io.ByteArrayInputStream but this version is not thread safe.
-
-
Constructor Summary
Constructors Constructor Description ByteArrayInputStream(byte[] data)ByteArrayInputStream(byte[] data, int offset, int size)ByteArrayInputStream(ByteSequence sequence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidmark(int markpos)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidreset()longskip(long len)-
Methods inherited from class java.io.InputStream
close, nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
ByteArrayInputStream
public ByteArrayInputStream(byte[] data)
-
ByteArrayInputStream
public ByteArrayInputStream(ByteSequence sequence)
-
ByteArrayInputStream
public ByteArrayInputStream(byte[] data, int offset, int size)
-
-
Method Detail
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len)- Overrides:
readin classInputStream
-
skip
public long skip(long len) throws IOException- Overrides:
skipin classInputStream- Throws:
IOException
-
available
public int available()
- Overrides:
availablein classInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream
-
mark
public void mark(int markpos)
- Overrides:
markin classInputStream
-
reset
public void reset()
- Overrides:
resetin classInputStream
-
-