Interface TsFileOutput

    • Method Detail

      • write

        void write​(byte[] b)
            throws IOException
        Writes b.length bytes from the specified byte array to this output at the current position.
        Parameters:
        b - the data.
        Throws:
        IOException - if an I/O error occurs.
      • write

        void write​(byte b)
            throws IOException
        Writes 1 byte to this output at the current position.
        Parameters:
        b - the data.
        Throws:
        IOException - if an I/O error occurs.
      • write

        void write​(ByteBuffer b)
            throws IOException
        Writes b.remaining() bytes from the specified byte array to this output at the current position.
        Parameters:
        b - the data.
        Throws:
        IOException - if an I/O error occurs.
      • getPosition

        long getPosition()
                  throws IOException
        gets the current position of the Output. This method is usually used for recording where the data is.
        For example, if the Output is a fileOutputStream, then getPosition returns its file position.
        Returns:
        current position
        Throws:
        IOException - if an I/O error occurs.
      • wrapAsStream

        OutputStream wrapAsStream()
                           throws IOException
        convert this TsFileOutput as a outputstream.
        Returns:
        an output stream whose position is the same with this Output
        Throws:
        IOException - if an I/O error occurs.
      • force

        void force()
            throws IOException
        Make sure that the data in the buffer is flushed to disk
        Throws:
        IOException