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 int
available()
void
mark(int markpos)
boolean
markSupported()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
void
reset()
long
skip(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:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] b) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len)
- Overrides:
read
in classInputStream
-
skip
public long skip(long len) throws IOException
- 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
-
-