org.alfresco.repo.remote
Class RepoRemoteOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.alfresco.repo.remote.RepoRemoteOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class RepoRemoteOutputStream
extends java.io.OutputStream

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


Constructor Summary
RepoRemoteOutputStream(java.lang.String handle, RepoRemoteTransport remote, ClientTicketHolder ticketHolder)
          Create a new one.
 
Method Summary
 void close()
          Close the stream.
 void write(byte[] b)
          Write a buffer of data.
 void write(byte[] b, int off, int len)
          Write a portion of a block of bytes.
 void write(int b)
          Write one character.
 
Methods inherited from class java.io.OutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepoRemoteOutputStream

public RepoRemoteOutputStream(java.lang.String handle,
                              RepoRemoteTransport remote,
                              ClientTicketHolder ticketHolder)
Create a new one.

Parameters:
handle - The handle returned from an RepoRemoteTransport call.
remote - The AVMRemote instance.
Method Detail

write

public void write(int b)
           throws java.io.IOException
Write one character.

Specified by:
write in class java.io.OutputStream
Parameters:
b - The character.
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Close the stream.

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

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Write a portion of a block of bytes.

Overrides:
write in class java.io.OutputStream
Parameters:
b - The buffer containing the data.
off - The offset into the buffer.
len - The number of bytes to write.
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Write a buffer of data.

Overrides:
write in class java.io.OutputStream
Parameters:
b - The buffer.
Throws:
java.io.IOException


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