com.interstarinc.xmedius.sendfax
Class IdlInputStream
java.lang.Object
org.omg.PortableServer.Servant
Xm.InputStreamPOA
com.interstarinc.xmedius.sendfax.IdlInputStream
- All Implemented Interfaces:
- InvokeHandler, Xm.InputStreamOperations
public class IdlInputStream
- extends Xm.InputStreamPOA
| 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 |
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
IdlInputStream
public IdlInputStream(String extension,
InputStream stream)
throws IOException
- Parameters:
extension - The content type of the streamstream - The InputStream to adapt
- Throws:
IOException
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