Package org.apache.activemq.util
Class ByteArrayInputStream
java.lang.Object
java.io.InputStream
org.apache.activemq.util.ByteArrayInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Very similar to the java.io.ByteArrayInputStream but this version is not
thread safe.
-
Constructor Summary
ConstructorDescriptionByteArrayInputStream
(byte[] data) ByteArrayInputStream
(byte[] data, int offset, int size) ByteArrayInputStream
(ByteSequence sequence) -
Method Summary
Methods inherited from class java.io.InputStream
close, nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
ByteArrayInputStream
public ByteArrayInputStream(byte[] data) -
ByteArrayInputStream
-
ByteArrayInputStream
public ByteArrayInputStream(byte[] data, int offset, int size)
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) - Overrides:
read
in classInputStream
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
available
public int available()- Overrides:
available
in classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
mark
public void mark(int markpos) - Overrides:
mark
in classInputStream
-
reset
public void reset()- Overrides:
reset
in classInputStream
-