Package ipsk.io
Class VectorBufferedOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- ipsk.io.VectorBufferedOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class VectorBufferedOutputStream extends java.io.OutputStream
OutputStream stores data to aVectorBuffer
.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_BUFSIZE
-
Constructor Summary
Constructors Constructor Description VectorBufferedOutputStream()
Create new vector bufferedOutputStream
.VectorBufferedOutputStream(int bufSize)
Create new vector bufferedOutputStream
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
long
getLength()
Get length of data.VectorBuffer
getVectorBuffer()
Get the data as vector buffer.VectorBuffer
getVectorBufferCopy()
Get a clone of the data.boolean
isClosed()
void
write(byte[] buf)
void
write(byte[] buf, int offset, int len)
void
write(int b)
-
-
-
Field Detail
-
DEFAULT_BUFSIZE
public static final int DEFAULT_BUFSIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getVectorBufferCopy
public VectorBuffer getVectorBufferCopy()
Get a clone of the data.- Returns:
- vector buffer clone
-
getVectorBuffer
public VectorBuffer getVectorBuffer()
Get the data as vector buffer.- Returns:
- vector buffer
-
getLength
public long getLength()
Get length of data.- Returns:
- length of data in bytes
-
isClosed
public boolean isClosed()
-
write
public void write(int b) throws java.io.IOException
- Specified by:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] buf)
- Overrides:
write
in classjava.io.OutputStream
-
write
public void write(byte[] buf, int offset, int len)
- Overrides:
write
in classjava.io.OutputStream
-
available
public int available()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.OutputStream
-
-