Class LineOutputStream

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

    public class LineOutputStream
    extends java.io.FilterOutputStream
    This class is to support writing out Strings as a sequence of bytes terminated by a CRLF sequence. The String must contain only US-ASCII characters.

    The expected use is to write out RFC822 style headers to an output stream.

    • Constructor Summary

      Constructors 
      Constructor Description
      LineOutputStream​(java.io.OutputStream out)  
      LineOutputStream​(java.io.OutputStream out, boolean allowutf8)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void writeln()  
      void writeln​(java.lang.String s)  
      • Methods inherited from class java.io.FilterOutputStream

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

        nullOutputStream
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LineOutputStream

        public LineOutputStream​(java.io.OutputStream out)
      • LineOutputStream

        public LineOutputStream​(java.io.OutputStream out,
                                boolean allowutf8)
        Parameters:
        out - the OutputStream
        allowutf8 - allow UTF-8 characters?
        Since:
        JavaMail 1.6
    • Method Detail

      • writeln

        public void writeln​(java.lang.String s)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • writeln

        public void writeln()
                     throws java.io.IOException
        Throws:
        java.io.IOException