com.interstarinc.xmedius.sendfax
Class IdlInputStream

java.lang.Object
  extended by org.omg.PortableServer.Servant
      extended by Xm.InputStreamPOA
          extended by com.interstarinc.xmedius.sendfax.IdlInputStream
All Implemented Interfaces:
InvokeHandler, Xm.InputStreamOperations

public class IdlInputStream
extends Xm.InputStreamPOA


Field Summary
private  String extension
           
private static int MARK_LIMIT
           
private  int size
           
private  BufferedInputStream stream
           
 
Constructor Summary
IdlInputStream(String extension, InputStream stream)
           
 
Method Summary
 void Close()
          Deletes this object
 String ContentType()
           
 int GetSize()
           
 byte[] Read(boolean fromBeginning, int maxSize)
          Download a block of data.
 
Methods inherited from class Xm.InputStreamPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MARK_LIMIT

private static final int MARK_LIMIT
See Also:
Constant Field Values

extension

private String extension

size

private int size

stream

private BufferedInputStream stream
Constructor Detail

IdlInputStream

public IdlInputStream(String extension,
                      InputStream stream)
               throws IOException
Parameters:
extension - The content type of the stream
stream - The InputStream to adapt
Throws:
IOException
Method Detail

GetSize

public int GetSize()
Returns:
The total size of the file buffer (in bytes)

Read

public byte[] Read(boolean fromBeginning,
                   int maxSize)
Download a block of data. If the size of StreamData is smaller than MaxSize, the download is complete and the InputStream object will auto-destroy.

Parameters:
fromBeginning - Start download from the beginning of stream (true) or continue from the position in a of a previous read (false)
maxSize - Size of the block of data to download
Returns:
The data read

ContentType

public String ContentType()
Returns:
The content type of the stream (extension).

Close

public void Close()
Deletes this object