net.netheos.pcsapi.bytesio
Interface ByteSink

All Known Implementing Classes:
FileByteSink, MemoryByteSink, ProgressByteSink

public interface ByteSink

Represents a destination where bytes can be written


Method Summary
 ByteSinkStream openStream()
          Returns a ByteSinkStream object for writing data, to be closed by caller.
 void setExpectedLength(long expectedLength)
          Defines the number of bytes that are expected to be written to the stream.
 

Method Detail

openStream

ByteSinkStream openStream()
                          throws IOException
Returns a ByteSinkStream object for writing data, to be closed by caller. This method may be called several times (in case of retries)"

Returns:
ByteSinkStream
Throws:
IOException

setExpectedLength

void setExpectedLength(long expectedLength)
Defines the number of bytes that are expected to be written to the stream. This value may be defined lately (after stream creation)

Note that this length may differ from the final data size, for example if bytes are appended to an already existing file.

Parameters:
expectedLength -


Copyright © 2014. All Rights Reserved.