|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.assembly.utils.LineEndingsUtils
public final class LineEndingsUtils
Line Ending class which contains convenience methods to change line endings.
Method Summary | |
---|---|
static void |
convertLineEndings(File source,
File dest,
LineEndings lineEndings,
Boolean atEndOfFile,
String encoding)
Converts the line endings of a file, writing a new file. |
static LineEndings |
getLineEnding(String lineEnding)
|
static String |
getLineEndingCharacters(String lineEnding)
Returns the appopriate line ending characters for the specified style |
static InputStream |
lineEndingConverter(InputStream in,
LineEndings lineEndings)
Converts the line endings of a file, writing a new file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void convertLineEndings(@Nonnull File source, @Nonnull File dest, LineEndings lineEndings, Boolean atEndOfFile, String encoding) throws IOException
source
- The source file, not nulldest
- The destination file, not nulllineEndings
- This is the result of the getLineEndingChars(..) method in this utility class; the actual
line-ending characters, not null.atEndOfFile
- The end-of-file line ending, if true then the resulting file will have a new line at the end
even if the input didn't have one, if false then the resulting file will have no new line at
the end even if the input did have one, null to determine whether to have a new line at the
end of the file based on the input fileencoding
- The encoding to use, null for platform encoding
IOException
- .public static InputStream lineEndingConverter(@Nonnull InputStream in, LineEndings lineEndings) throws IOException
in
- The source readerlineEndings
- This is the result of the getLineEndingChars(..) method in this utility class; the actual
line-ending characters, not null.
IOException
@Nonnull public static LineEndings getLineEnding(@Nullable String lineEnding) throws AssemblyFormattingException
AssemblyFormattingException
@Nullable public static String getLineEndingCharacters(@Nullable String lineEnding) throws AssemblyFormattingException
lineEnding
- The name of the line ending style,
see org.apache.maven.plugin.assembly.utils.LineEndings#valueOf
AssemblyFormattingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |