net.netheos.pcsapi.bytesio
Class ProgressByteSource

java.lang.Object
  extended by net.netheos.pcsapi.bytesio.ProgressByteSource
All Implemented Interfaces:
ByteSource

public class ProgressByteSource
extends Object
implements ByteSource

A byte source that notifies a ProgressListener ; data is read from underlying ByteSource. This class is meant to be used only internally. Use CUploadRequest.setProgressListener() instead.


Constructor Summary
ProgressByteSource(ByteSource source, ProgressListener listener)
           
 
Method Summary
 long length()
          Return length of stream (must be known before consuming stream)
 InputStream openStream()
          Returns a ByteSourceStream object for reading data, to be closed by caller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressByteSource

public ProgressByteSource(ByteSource source,
                          ProgressListener listener)
Method Detail

openStream

public InputStream openStream()
                       throws IOException
Description copied from interface: ByteSource
Returns a ByteSourceStream object for reading data, to be closed by caller

Specified by:
openStream in interface ByteSource
Returns:
the underlying stream
Throws:
IOException

length

public long length()
Description copied from interface: ByteSource
Return length of stream (must be known before consuming stream)

Specified by:
length in interface ByteSource
Returns:
The stream bytes count


Copyright © 2014. All Rights Reserved.