Class RpcLineEndFilterInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- com.perforce.p4java.impl.mapbased.rpc.sys.RpcLineEndFilterInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class RpcLineEndFilterInputStream extends java.io.FilterInputStreamFilter input stream to do Perforce-specific line end munging where necessary. This is a lot more complicated that you might think, given the potential for cross-packet and cross-read multibyte end of line spanning. This should always be placed after a charset converter pipe. Double byte charsets are not allowed here!
-
-
Constructor Summary
Constructors Constructor Description RpcLineEndFilterInputStream(java.io.InputStream inStream, ClientLineEnding lineEnding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)Convenience method; equivalent to read(b, 0, b.length).intread(byte[] targetBytes, int off, int len)Read from the associated input stream looking for end of line strings to replace with the Perforce server newline character.voidreset()longskip(long n)
-
-
-
Constructor Detail
-
RpcLineEndFilterInputStream
public RpcLineEndFilterInputStream(java.io.InputStream inStream, ClientLineEnding lineEnding)
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] targetBytes, int off, int len) throws java.io.IOExceptionRead from the associated input stream looking for end of line strings to replace with the Perforce server newline character.- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOExceptionConvenience method; equivalent to read(b, 0, b.length).- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.FilterInputStream- Throws:
java.io.IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classjava.io.FilterInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.FilterInputStream
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
-