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.OutputStreamOutputStream stores data to aVectorBuffer.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_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 intavailable()voidclose()longgetLength()Get length of data.VectorBuffergetVectorBuffer()Get the data as vector buffer.VectorBuffergetVectorBufferCopy()Get a clone of the data.booleanisClosed()voidwrite(byte[] buf)voidwrite(byte[] buf, int offset, int len)voidwrite(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:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] buf)
- Overrides:
writein classjava.io.OutputStream
-
write
public void write(byte[] buf, int offset, int len)- Overrides:
writein classjava.io.OutputStream
-
available
public int available()
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream
-
-