Class StreamsFormatter

java.lang.Object
io.spring.javaformat.formatter.StreamsFormatter

public class StreamsFormatter extends Object
A code formatter designed to work with IO streams.
Author:
Phillip Webb
See Also:
  • Constructor Details

    • StreamsFormatter

      public StreamsFormatter()
    • StreamsFormatter

      public StreamsFormatter(JavaFormatConfig javaFormatConfig)
    • StreamsFormatter

      public StreamsFormatter(Formatter formatter)
  • Method Details

    • format

      public StreamsEdit format(InputStream inputStream)
      Format content from the given source InputStream and return a StreamsEdit instance.
      Parameters:
      inputStream - the source input stream
      Returns:
      a streams edit
    • format

      public StreamsEdit format(InputStream inputStream, Charset encoding)
      Format content from the given source InputStream and return a StreamsEdit instance.
      Parameters:
      inputStream - the source input stream
      encoding - the source encoding
      Returns:
      a streams edit
    • format

      public StreamsEdit format(InputStream inputStream, Charset encoding, String lineSeparator)
      Format content from the given source InputStream and return a StreamsEdit instance.
      Parameters:
      inputStream - the source input stream
      encoding - the source encoding
      lineSeparator - the line separator
      Returns:
      a streams edit
    • format

      public StreamsEdit format(Reader reader)
      Format content from the given source Reader and return a StreamsEdit instance.
      Parameters:
      reader - the source reader
      Returns:
      a streams edit
    • format

      public StreamsEdit format(Reader reader, String lineSeparator)
      Format content from the given source Reader and return a StreamsEdit instance.
      Parameters:
      reader - the source reader
      lineSeparator - the line separator
      Returns:
      a streams edit