public class RpcOutputStream extends FileOutputStream
Note that for the unzipping we use a contained file output stream rather than ourself, mostly to avoid recursion...
Some of the raw GZUNZIP methods and definitions are copied pretty much as-is from the original gkzip stuff.
The 10.2 sync / transfer integrity checks are basically implemented here, with help from the RpcInflaterOutputStream class. The way this is done is the MD5 hashing has to be done against the incoming 'raw' bytes (i.e. the normalized server-side form of the file) unless the incoming file type is compressed binary, in which case we have to hash the uncompressed version. The non-binary hashing is done here; the compressed stuff is done in RpcInflaterOutputStream.
| Constructor and Description |
|---|
RpcOutputStream(RpcPerforceFile file) |
RpcOutputStream(RpcPerforceFile file,
Charset charset,
boolean isUnicodeServer,
boolean useLocalDigester) |
RpcOutputStream(RpcPerforceFile file,
Charset charset,
boolean isUnicodeServer,
boolean useLocalDigester,
int filesys_utf8bom) |
RpcOutputStream(RpcPerforceFile file,
RpcConnection rpcConnection,
boolean useLocalDigester) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
RpcPerforceFile |
getFile() |
MD5Digester |
getLocalDigester() |
String |
getServerDigest() |
void |
setLocalDigester(MD5Digester localDigester) |
void |
setServerDigest(String serverDigest) |
void |
write(byte[] b) |
void |
write(byte[] sourceBytes,
int off,
int len) |
void |
write(int b) |
long |
write(Map<String,Object> map)
Specialized write method to write a map containing a byte array
with the key RpcFunctionMapKey.DATA (all other fields are ignored).
|
long |
writeConverted(byte[] sourceBytes)
Write an array of bytes with being aware of encodings, line ending
conversions, and compression.
|
finalize, getChannel, getFDflushpublic RpcOutputStream(RpcPerforceFile file) throws IOException
IOExceptionpublic RpcOutputStream(RpcPerforceFile file, RpcConnection rpcConnection, boolean useLocalDigester) throws IOException
IOExceptionpublic RpcOutputStream(RpcPerforceFile file, Charset charset, boolean isUnicodeServer, boolean useLocalDigester) throws IOException
IOExceptionpublic RpcOutputStream(RpcPerforceFile file, Charset charset, boolean isUnicodeServer, boolean useLocalDigester, int filesys_utf8bom) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FileOutputStreamIOExceptionpublic long write(Map<String,Object> map) throws IOException, FileDecoderException, FileEncoderException
public void write(byte[] sourceBytes,
int off,
int len)
throws IOException
write in class FileOutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class FileOutputStreamIOExceptionpublic long writeConverted(byte[] sourceBytes)
throws IOException,
FileDecoderException,
FileEncoderException
sourceBytes - IOExceptionFileEncoderExceptionFileDecoderExceptionpublic void write(int b)
throws IOException
write in class FileOutputStreamIOExceptionpublic RpcPerforceFile getFile()
public String getServerDigest()
public void setServerDigest(String serverDigest)
public MD5Digester getLocalDigester()
public void setLocalDigester(MD5Digester localDigester)
Copyright © 2017 Perforce Software. All Rights Reserved.