com.perforce.p4java.impl.mapbased.rpc.sys
Class RpcInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FileInputStream
          extended by com.perforce.p4java.impl.mapbased.rpc.sys.RpcInputStream
All Implemented Interfaces:
Closeable

public class RpcInputStream
extends FileInputStream

Provides a Perforce-specific extension to the basic Java InputStream to allow us to intercept methods and implement our own extensions.

The current main use is for line-end processing with the RpcLineEndFilterInputStream filter class; more uses will probably follow with experience....


Constructor Summary
RpcInputStream(RpcPerforceFile file)
           
 
Method Summary
 void close()
           
 int read()
           
 int read(byte[] targetBytes)
           
 int read(byte[] targetBytes, int targetOffset, int targetLen)
           
 
Methods inherited from class java.io.FileInputStream
available, finalize, getChannel, getFD, skip
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RpcInputStream

public RpcInputStream(RpcPerforceFile file)
               throws IOException
Throws:
IOException
Method Detail

close

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

read

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

read

public int read(byte[] targetBytes,
                int targetOffset,
                int targetLen)
         throws IOException
Overrides:
read in class FileInputStream
Throws:
IOException

read

public int read(byte[] targetBytes)
         throws IOException
Overrides:
read in class FileInputStream
Throws:
IOException


Copyright © 2015 Perforce Software. All Rights Reserved.