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.InputStreamInput 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 voidappend(byte[] buffer)Append to the input stream.intread()intread(byte[] bytes, int offset, int length)voidreset()
-
-
-
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:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] bytes, int offset, int length) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
reset
public void reset()
- Overrides:
resetin classjava.io.InputStream
-
-