org.jibx.runtime.impl
Interface IChunkedOutput


public interface IChunkedOutput

Interface used to enhance an output stream with a separate method for writing the last chunk of data in a message. This is useful when working with a chunking transport layer, so that the output stream knows which particular write operation is the last one in the sequence.

Author:
Dennis M. Sosnoski

Method Summary
 void write(byte[] b, int off, int len)
          Normal write from byte array.
 void writeFinal(byte[] b, int off, int len)
          Write last data chunk from byte array.
 

Method Detail

write

void write(byte[] b,
           int off,
           int len)
           throws java.io.IOException
Normal write from byte array. This method is included only to make it clear that the writeFinal(byte[], int, int) is an alternative to the normal write.

Parameters:
b - byte array
off - starting offset
len - number of bytes to write
Throws:
java.io.IOException - on write error

writeFinal

void writeFinal(byte[] b,
                int off,
                int len)
                throws java.io.IOException
Write last data chunk from byte array. This method finishes output. It is an error if any further write operations (using either the write(byte[], int, int) method defined in this interface, or any of the other java.io.OutputStream methods) are executed after the call to this method.

Parameters:
b - byte array
off - starting offset
len - number of bytes to write
Throws:
java.io.IOException - on write error


Project Web Site