Class OutputStreamDataSource

    • Constructor Detail

      • OutputStreamDataSource

        public OutputStreamDataSource​(int size)
    • Method Detail

      • read

        public Buffer read()
                    throws IOException
        Description copied from interface: DataSource
        Reads a data buffer from this data source.
        Specified by:
        read in interface DataSource
        Returns:
        The data buffer read. Null, if there is no more data to be read.
        Throws:
        IOException - if an I/O error occurs.
      • close

        public void close()
                   throws IOException
        Description copied from interface: DataSource
        Closes this data source and releases any system resources associated with this source.
        Specified by:
        close in interface DataSource
        Throws:
        IOException - if an I/O error occurs.
      • totalSize

        public long totalSize()
                       throws IOException
        Description copied from interface: DataSource
        Optional operation. Returns the total size, in bytes, of the data in this source. If the implementation is not able to provide a total size for the data source, it should return -1
        Specified by:
        totalSize in interface DataSource
        Throws:
        IOException - if an I/O exception occurs