com.perforce.p4java.impl.mapbased.rpc.stream
Class RpcGZIPInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.util.zip.InflaterInputStream
              extended by com.perforce.p4java.impl.mapbased.rpc.stream.RpcGZIPInputStream
All Implemented Interfaces:
Closeable

public class RpcGZIPInputStream
extends InflaterInputStream

A lightweight wrapper around the JZlib GZIP input stream for processing compressed streams being sent from Perforce servers when the client "client compress" mode is enabled.

Note that the Perforce version of the GZIP stream dispenses with headers and trailers, but is otherwise fairly standard (which is why this works).


Field Summary
 
Fields inherited from class java.util.zip.InflaterInputStream
buf, inf, len
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
RpcGZIPInputStream(InputStream in)
           
 
Method Summary
 void close()
           
 int read()
           
 int read(byte[] bytes)
           
 int read(byte[] bytes, int offset, int len)
           
 
Methods inherited from class java.util.zip.InflaterInputStream
available, fill, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RpcGZIPInputStream

public RpcGZIPInputStream(InputStream in)
                   throws IOException
Throws:
IOException
Method Detail

read

public int read(byte[] bytes)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

read

public int read(byte[] bytes,
                int offset,
                int len)
         throws IOException
Overrides:
read in class InflaterInputStream
Throws:
IOException

read

public int read()
         throws IOException
Overrides:
read in class InflaterInputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InflaterInputStream
Throws:
IOException


Copyright © 2015 Perforce Software. All Rights Reserved.