Class SocketHelper.ByteArrayBackedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- ptolemy.actor.lib.jjs.modules.socket.SocketHelper.ByteArrayBackedInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- SocketHelper
public static class SocketHelper.ByteArrayBackedInputStream extends java.io.InputStream
Input stream backed by a list of byte arrays.
-
-
Constructor Summary
Constructors Constructor Description ByteArrayBackedInputStream(byte[] buffer)
Consruct a SocketHelper$ByteArrayBackedInputStream object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(byte[] buffer)
Append to the input stream.int
read()
int
read(byte[] bytes, int offset, int length)
void
reset()
-
-
-
Method Detail
-
append
public void append(byte[] buffer)
Append to the input stream.- Parameters:
buffer
- the buffer to be appended.
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] bytes, int offset, int length) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
reset
public void reset()
- Overrides:
reset
in classjava.io.InputStream
-
-