Package org.jitsi.util
Class ByteBufferOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.jitsi.util.ByteBufferOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class ByteBufferOutputStream extends OutputStream
Represents a byte array as an OutputStream.- Author:
- Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description ByteBufferOutputStream(byte[] buf)Initializes a new ByteBufferOutputStream instance which is to represent a specific byte array as an OutputStream.ByteBufferOutputStream(byte[] buf, int off, int len)Initializes a new ByteBufferOutputStream instance which is to represent a specific byte array as an OutputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intsize()Returns the number of bytes written into this OutputStream.voidwrite(int b)-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
-
-
-
-
Constructor Detail
-
ByteBufferOutputStream
public ByteBufferOutputStream(byte[] buf)
Initializes a new ByteBufferOutputStream instance which is to represent a specific byte array as an OutputStream.- Parameters:
buf- the byte array for which the new instance is to implement OutputStream
-
ByteBufferOutputStream
public ByteBufferOutputStream(byte[] buf, int off, int len)Initializes a new ByteBufferOutputStream instance which is to represent a specific byte array as an OutputStream.- Parameters:
buf- the byte array for which the new instance is to implement OutputStreamoff-len-
-
-
Method Detail
-
size
public int size()
Returns the number of bytes written into this OutputStream.- Returns:
- the number of bytes written into this OutputStream
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
-