Package org.alfresco.repo.remote
Class RepoRemoteInputStream
java.lang.Object
java.io.InputStream
org.alfresco.repo.remote.RepoRemoteInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
A wrapper implementation of InputStream to work with a RepoRemoteTransport instance.
- Author:
- britt
-
Constructor Summary
ConstructorsConstructorDescriptionRepoRemoteInputStream(String handle, RepoRemoteTransport remote, ClientTicketHolder ticketHolder) Construct one. -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
RepoRemoteInputStream
public RepoRemoteInputStream(String handle, RepoRemoteTransport remote, ClientTicketHolder ticketHolder) Construct one.- Parameters:
handle- The handle returned by getInputStream();remote- The AVMRemote instance.
-
-
Method Details
-
read
Read in a single byte.- Specified by:
readin classInputStream- Returns:
- The byte as 0-255 or -1 for eof.
- Throws:
IOException
-
read
Read a buffer of bytes.- Overrides:
readin classInputStream- Parameters:
b- The buffer into which to put the bytes.off- The offset into the buffer.len- The number of bytes to read.- Returns:
- The actual number of bytes read or -1 on eof.
- Throws:
IOException
-
close
Close the underlying AVMRemote handle.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-