JavaScript is disabled on your browser.
gnu.inet.util

Class CRLFOutputStream

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


    public class CRLFOutputStream
    extends java.io.FilterOutputStream
    An output stream that filters LFs into CR/LF pairs.
    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int CR
      The CR octet.
      static byte[] CRLF
      The CR/LF pair.
      protected int last
      The last byte read.
      static int LF
      The LF octet.
      • Fields inherited from class java.io.FilterOutputStream

        out
    • Constructor Summary

      Constructors
      Constructor and Description
      CRLFOutputStream (java.io.OutputStream out)
      Constructs a CR/LF output stream connected to the specified output stream.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      void write (byte[] b)
      Writes a byte array to the underlying stream.
      void write (byte[] b, int off, int len)
      Writes a portion of a byte array to the underlying stream.
      void write (int ch)
      Writes a character to the underlying stream.
      void write (java.lang.String text)
      Writes the specified ASCII string to the underlying stream.
      void writeln ()
      Writes a newline to the underlying stream.
      • Methods inherited from class java.io.FilterOutputStream

        close, flush
      • Methods inherited from class java.lang.Object

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

      • CRLF

        public static final byte[] CRLF
        The CR/LF pair.
      • last

        protected int last
        The last byte read.
    • Constructor Detail

      • CRLFOutputStream

        public CRLFOutputStream(java.io.OutputStream out)
        Constructs a CR/LF output stream connected to the specified output stream.
    • Method Detail

      • write

        public void write(int ch)
         throws java.io.IOException
        Writes a character to the underlying stream.
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException - if an I/O error occurred
      • write

        public void write(byte[] b)
         throws java.io.IOException
        Writes a byte array to the underlying stream.
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException - if an I/O error occurred
      • write

        public void write(byte[] b,
         int off,
         int len)
         throws java.io.IOException
        Writes a portion of a byte array to the underlying stream.
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException - if an I/O error occurred
      • write

        public void write(java.lang.String text)
         throws java.io.IOException
        Writes the specified ASCII string to the underlying stream.
        Throws:
        java.io.IOException - if an I/O error occurred
      • writeln

        public void writeln()
         throws java.io.IOException
        Writes a newline to the underlying stream.
        Throws:
        java.io.IOException - if an I/O error occurred

AltStyle によって変換されたページ (->オリジナル) /