Package io.spring.javaformat.formatter
Class StreamsFormatter
java.lang.Object
io.spring.javaformat.formatter.StreamsFormatter
A code formatter designed to work with IO streams.
- Author:
- Phillip Webb
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStreamsFormatter(io.spring.javaformat.config.JavaFormatConfig javaFormatConfig) StreamsFormatter(Formatter formatter) -
Method Summary
Modifier and TypeMethodDescriptionformat(InputStream inputStream) Format content from the given sourceInputStreamand return aStreamsEditinstance.format(InputStream inputStream, Charset encoding) Format content from the given sourceInputStreamand return aStreamsEditinstance.format(InputStream inputStream, Charset encoding, String lineSeparator) Format content from the given sourceInputStreamand return aStreamsEditinstance.Format content from the given sourceReaderand return aStreamsEditinstance.Format content from the given sourceReaderand return aStreamsEditinstance.
-
Constructor Details
-
StreamsFormatter
public StreamsFormatter() -
StreamsFormatter
public StreamsFormatter(io.spring.javaformat.config.JavaFormatConfig javaFormatConfig) -
StreamsFormatter
-
-
Method Details
-
format
Format content from the given sourceInputStreamand return aStreamsEditinstance.- Parameters:
inputStream- the source input stream- Returns:
- a streams edit
-
format
Format content from the given sourceInputStreamand return aStreamsEditinstance.- Parameters:
inputStream- the source input streamencoding- the source encoding- Returns:
- a streams edit
-
format
Format content from the given sourceInputStreamand return aStreamsEditinstance.- Parameters:
inputStream- the source input streamencoding- the source encodinglineSeparator- the line separator- Returns:
- a streams edit
-
format
Format content from the given sourceReaderand return aStreamsEditinstance.- Parameters:
reader- the source reader- Returns:
- a streams edit
-
format
Format content from the given sourceReaderand return aStreamsEditinstance.- Parameters:
reader- the source readerlineSeparator- the line separator- Returns:
- a streams edit
-