Class RpcLineEndFilterOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public class RpcLineEndFilterOutputStream
    extends java.io.FilterOutputStream
    Simple FilterOutputStream extension to deal with Perforce text file line end translation.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static byte P4SERVER_LINSEP_BYTE  
      static java.lang.String P4SERVER_LINSEP_STR
      What the Perforce server uses as a line end separator when sending us text file contents
      • Fields inherited from class java.io.FilterOutputStream

        out
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write​(byte[] bytes)  
      void write​(byte[] bytes, int off, int len)  
      void write​(java.io.OutputStream out, byte[] bytes, int off, int len)  
      • Methods inherited from class java.io.FilterOutputStream

        close, flush, write
      • Methods inherited from class java.io.OutputStream

        nullOutputStream
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • P4SERVER_LINSEP_STR

        public static final java.lang.String P4SERVER_LINSEP_STR
        What the Perforce server uses as a line end separator when sending us text file contents
        See Also:
        Constant Field Values
    • Constructor Detail

      • RpcLineEndFilterOutputStream

        public RpcLineEndFilterOutputStream​(java.io.OutputStream out,
                                            ClientLineEnding lineEnding)
    • Method Detail

      • write

        public void write​(java.io.OutputStream out,
                          byte[] bytes,
                          int off,
                          int len)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] bytes,
                          int off,
                          int len)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] bytes)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException