org.alfresco.repo.remote
Class RepoRemoteInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.alfresco.repo.remote.RepoRemoteInputStream
All Implemented Interfaces:
java.io.Closeable

public class RepoRemoteInputStream
extends java.io.InputStream

A wrapper implementation of InputStream to work with a RepoRemoteTransport instance.


Constructor Summary
RepoRemoteInputStream(java.lang.String handle, RepoRemoteTransport remote, ClientTicketHolder ticketHolder)
          Construct one.
 
Method Summary
 void close()
          Close the underlying AVMRemote handle.
 int read()
          Read in a single byte.
 int read(byte[] b, int off, int len)
          Read a buffer of bytes.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepoRemoteInputStream

public RepoRemoteInputStream(java.lang.String handle,
                             RepoRemoteTransport remote,
                             ClientTicketHolder ticketHolder)
Construct one.

Parameters:
handle - The handle returned by getInputStream();
remote - The AVMRemote instance.
Method Detail

read

public int read()
         throws java.io.IOException
Read in a single byte.

Specified by:
read in class java.io.InputStream
Returns:
The byte as 0-255 or -1 for eof.
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Read a buffer of bytes.

Overrides:
read in class java.io.InputStream
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:
java.io.IOException

close

public void close()
           throws java.io.IOException
Close the underlying AVMRemote handle.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.