Package ipsk.io

Class VectorBufferedOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public class VectorBufferedOutputStream
    extends java.io.OutputStream
    OutputStream stores data to a VectorBuffer.
    Author:
    K.Jaensch, klausj@phonetik.uni-muenchen.de
    • Constructor Detail

      • VectorBufferedOutputStream

        public VectorBufferedOutputStream()
        Create new vector buffered OutputStream.
      • VectorBufferedOutputStream

        public VectorBufferedOutputStream​(int bufSize)
        Create new vector buffered OutputStream.
        Parameters:
        bufSize - the bufsize to use for the buffers
    • 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 class java.io.OutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] buf)
        Overrides:
        write in class java.io.OutputStream
      • write

        public void write​(byte[] buf,
                          int offset,
                          int len)
        Overrides:
        write in class java.io.OutputStream
      • available

        public int available()
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.OutputStream