Documentation of 'org.jhotdraw.samples.teddy.io.LFWriter' Java class
LFWriter
org.jhotdraw.samples.teddy.io

Class LFWriter

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


    public class LFWriter
    extends java.io.FilterWriter
    A character-output stream that converts line terminators into a configurable line separator sequence. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed.
    • Constructor Summary

      Constructors 
      Constructor and Description
      LFWriter(java.io.Writer out)
      Create a new line-numbering writer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getLineSeparator()
      Gets the line separator of the println() methods.
      void setLineSeparator(java.lang.String lineSeparator)
      Sets the line separator for the println() methods.
      void write(char[] cbuf, int off, int len)
      Write a portion of an array of characters.
      void write(int c)
      Write a single character.
      void write(java.lang.String str, int off, int len)
      Write a portion of a string.
      • Methods inherited from class java.io.FilterWriter

        close, flush
      • Methods inherited from class java.io.Writer

        append, append, append, write, write
      • Methods inherited from class java.lang.Object

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

      • LFWriter

        public LFWriter(java.io.Writer out)
        Create a new line-numbering writer.
    • Method Detail

      • getLineSeparator

        public java.lang.String getLineSeparator()
        Gets the line separator of the println() methods.
      • setLineSeparator

        public void setLineSeparator(java.lang.String lineSeparator)
        Sets the line separator for the println() methods.
      • write

        public void write(int c)
                   throws java.io.IOException
        Write a single character.
        Overrides:
        write in class java.io.FilterWriter
        Throws:
        java.io.IOException - If an I/O error occurs
      • write

        public void write(char[] cbuf,
                          int off,
                          int len)
                   throws java.io.IOException
        Write a portion of an array of characters.
        Overrides:
        write in class java.io.FilterWriter
        Parameters:
        cbuf - Buffer of characters to be written
        off - Offset from which to start reading characters
        len - Number of characters to be written
        Throws:
        java.io.IOException - If an I/O error occurs
      • write

        public void write(java.lang.String str,
                          int off,
                          int len)
                   throws java.io.IOException
        Write a portion of a string.
        Overrides:
        write in class java.io.FilterWriter
        Parameters:
        str - String to be written
        off - Offset from which to start reading characters
        len - Number of characters to be written
        Throws:
        java.io.IOException - If an I/O error occurs

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.