[]
        
(Showing Draft Content)

CSJ2K.j2k.codestream.writer.FileCodestreamWriter.-ctor

FileCodestreamWriter Constructor

FileCodestreamWriter(object, int)

Opens the file 'file' for writing the codestream. The magic number is written to the bit stream. Normally, the header encoder must be empty (i.e. no data has been written to it yet). A BufferedOutputStream is used on top of the file to increase throughput, the length of the buffer is DEF_BUF_LEN.

Declaration
public FileCodestreamWriter(object file, int mb)
Parameters
Type Name Description
object file

The file where to write the bit stream

int mb

The maximum number of bytes that can be written to the bit stream.

Exceptions
Type Condition
IOException

If an error occurs while trying to open the file for writing or while writing the magic number.

FileCodestreamWriter(string, int)

Opens the file named 'fname' for writing the bit stream, using the 'he' header encoder. The magic number is written to the bit stream. Normally, the header encoder must be empty (i.e. no data has been written to it yet). A BufferedOutputStream is used on top of the file to increase throughput, the length of the buffer is DEF_BUF_LEN.

Declaration
public FileCodestreamWriter(string fname, int mb)
Parameters
Type Name Description
string fname

The name of file where to write the bit stream

int mb

The maximum number of bytes that can be written to the bit stream.

Exceptions
Type Condition
IOException

If an error occurs while trying to open the file for writing or while writing the magic number.

FileCodestreamWriter(Stream, int)

Uses the output stream 'os' for writing the bit stream, using the 'he' header encoder. The magic number is written to the bit stream. Normally, the header encoder must be empty (i.e. no data has been written to it yet). No BufferedOutputStream is used on top of the output stream 'os'.

Declaration
public FileCodestreamWriter(Stream os, int mb)
Parameters
Type Name Description
Stream os

The output stream where to write the bit stream.

int mb

The maximum number of bytes that can be written to the bit stream.

Exceptions
Type Condition
IOException

If an error occurs while writing the magic number to the 'os' output stream.