org.openmdx.base.stream.rmi.jrmp
Class BinarySource_1Proxy
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.openmdx.base.stream.rmi.jrmp.BinarySource_1Proxy
- All Implemented Interfaces:
- Serializable, Remote, Source_1_0, BinarySource_1_0
public class BinarySource_1Proxy
- extends UnicastRemoteObject
- implements BinarySource_1_0
Binary Source 1.0 JRMP Implementation
- See Also:
- Serialized Form
|
Method Summary |
void |
close()
Closes this iterator and releases any system resources associated with
it. |
protected boolean |
isOpen()
|
long |
length()
Get the stream's length |
byte[] |
readBytes(int capacity)
Updates all or part of the BLOB value that this Blob object
represents, as an array of bytes. |
delegate
protected BinarySource_1_0 delegate
BinarySource_1Proxy
public BinarySource_1Proxy(BinarySource_1_0 delegate)
throws IOException
- Creates an
StreamSource_1 so that it uses in
as its source.
- Parameters:
in - the underlying binary stream.length - The number of bytes in the stream or -1 if it is unknown.
- Throws:
IOException - if an I/O error occurs.
isOpen
protected boolean isOpen()
close
public void close()
throws IOException
- Closes this iterator and releases any system resources associated with
it.
No read() operation must be invoked after close().
- Specified by:
close in interface Source_1_0
- Throws:
IOException - if an I/O error occurs.
length
public long length()
throws IOException
- Description copied from interface:
Source_1_0
- Get the stream's length
- Specified by:
length in interface Source_1_0
- Returns:
- the length of the stream or -1 if it is unknown.
- Throws:
IOException
readBytes
public byte[] readBytes(int capacity)
throws IOException
- Updates all or part of the BLOB value that this Blob object
represents, as an array of bytes. This byte array contains up to
length consecutive bytes starting at the specified position.
- Specified by:
readBytes in interface BinarySource_1_0
- Parameters:
capacity - the number of consecutive bytes to be copied
- Returns:
- a byte array containing up to capacity consecutive bytes from
the BLOB;
or null in case of an end of stream condition
- Throws:
IOException - if an I/O error occurs.
This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.