Package org.alfresco.repo.remote
Class RepoRemoteOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.alfresco.repo.remote.RepoRemoteOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class RepoRemoteOutputStream extends java.io.OutputStreamA wrapper implementation of OutputStream to work with a RepoRemoteTransport instance.- Author:
- britt
-
-
Constructor Summary
Constructors Constructor Description RepoRemoteOutputStream(java.lang.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.
-
-
-
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.IOExceptionWrite one character.- Specified by:
writein classjava.io.OutputStream- Parameters:
b- The character.- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOExceptionClose the stream.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOExceptionWrite a portion of a block of bytes.- Overrides:
writein classjava.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.IOExceptionWrite a buffer of data.- Overrides:
writein classjava.io.OutputStream- Parameters:
b- The buffer.- Throws:
java.io.IOException
-
-