Package org.alfresco.repo.remote
Class RepoRemoteOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.alfresco.repo.remote.RepoRemoteOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class RepoRemoteOutputStream extends OutputStream
A wrapper implementation of OutputStream to work with a RepoRemoteTransport instance.- Author:
- britt
-
-
Constructor Summary
Constructors Constructor Description RepoRemoteOutputStream(String handle, RepoRemoteTransport remote, ClientTicketHolder ticketHolder)Create a new one.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the stream.voidwrite(byte[] b)Write a buffer of data.voidwrite(byte[] b, int off, int len)Write a portion of a block of bytes.voidwrite(int b)Write one character.-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
-
-
-
Constructor Detail
-
RepoRemoteOutputStream
public RepoRemoteOutputStream(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 IOExceptionWrite one character.- Specified by:
writein classOutputStream- Parameters:
b- The character.- Throws:
IOException
-
close
public void close() throws IOExceptionClose the stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOExceptionWrite a portion of a block of bytes.- Overrides:
writein classOutputStream- Parameters:
b- The buffer containing the data.off- The offset into the buffer.len- The number of bytes to write.- Throws:
IOException
-
write
public void write(byte[] b) throws IOExceptionWrite a buffer of data.- Overrides:
writein classOutputStream- Parameters:
b- The buffer.- Throws:
IOException
-
-