Skip to content

Commit 328ff75

Browse files
committed
Formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1483351 13f79535-47bb-0310-9956-ffa450edef68
1 parent 54f7d73 commit 328ff75

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,27 +113,25 @@ public ReversedLinesFileReader(final File file, final int blockSize, final Chars
113113
final Charset charset = Charsets.toCharset(encoding);
114114
final CharsetEncoder charsetEncoder = charset.newEncoder();
115115
final float maxBytesPerChar = charsetEncoder.maxBytesPerChar();
116-
if(maxBytesPerChar==1f) {
116+
if (maxBytesPerChar == 1f) {
117117
// all one byte encodings are no problem
118118
byteDecrement = 1;
119-
} else if(charset == Charset.forName("UTF-8")) {
119+
} else if (charset == Charset.forName("UTF-8")) {
120120
// UTF-8 works fine out of the box, for multibyte sequences a second UTF-8 byte can never be a newline byte
121121
// http://en.wikipedia.org/wiki/UTF-8
122122
byteDecrement = 1;
123-
} else if(charset == Charset.forName("Shift_JIS")) {
123+
} else if (charset == Charset.forName("Shift_JIS")) {
124124
// Same as for UTF-8
125125
// http://www.herongyang.com/Unicode/JIS-Shift-JIS-Encoding.html
126126
byteDecrement = 1;
127-
} else if(charset == Charset.forName("UTF-16BE") || charset == Charset.forName("UTF-16LE")) {
127+
} else if (charset == Charset.forName("UTF-16BE") || charset == Charset.forName("UTF-16LE")) {
128128
// UTF-16 new line sequences are not allowed as second tuple of four byte sequences,
129129
// however byte order has to be specified
130130
byteDecrement = 2;
131-
} else if(charset == Charset.forName("UTF-16")) {
132-
throw new UnsupportedEncodingException(
133-
"For UTF-16, you need to specify the byte order (use UTF-16BE or UTF-16LE)");
131+
} else if (charset == Charset.forName("UTF-16")) {
132+
throw new UnsupportedEncodingException("For UTF-16, you need to specify the byte order (use UTF-16BE or UTF-16LE)");
134133
} else {
135-
throw new UnsupportedEncodingException(
136-
"Encoding "+encoding+" is not supported yet (feel free to submit a patch)");
134+
throw new UnsupportedEncodingException("Encoding " + encoding + " is not supported yet (feel free to submit a patch)");
137135
}
138136
// NOTE: The new line sequences are matched in the order given, so it is important that \r\n is BEFORE \n
139137
newLineSequences = new byte[][] { "\r\n".getBytes(encoding), "\n".getBytes(encoding), "\r".getBytes(encoding) };

0 commit comments

Comments
 (0)