Module jakarta.mail

Interface LineOutputStream


  • public interface LineOutputStream
    This interface 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.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void write​(byte[] content)
      Writes b.length bytes to this output stream.
      void writeln()
      Writes a new line (CRLF).
      void writeln​(java.lang.String s)
      Writes the input string and a new line (CRLF).
    • Method Detail

      • writeln

        void writeln​(java.lang.String s)
              throws java.io.IOException
        Writes the input string and a new line (CRLF).
        Parameters:
        s - the string to write before the new line.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • writeln

        void writeln()
              throws java.io.IOException
        Writes a new line (CRLF).
        Throws:
        java.io.IOException - if an I/O error occurs.
      • write

        void write​(byte[] content)
            throws java.io.IOException
        Writes b.length bytes to this output stream.
        Parameters:
        content - the content to write.
        Throws:
        java.io.IOException - if an I/O error occurs.