Author: niallp Date: Sat Jan 7 02:06:38 2012 New Revision: 1228550 URL: http://svn.apache.org/viewvc?rev=1228550&view=rev Log: Checkstyle fixes
Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java?rev=1228550&r1=1228549&r2=1228550&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java Sat Jan 7 02:06:38 2012 @@ -53,7 +53,7 @@ public class ReversedLinesFileReader imp * * @param file * the file to be read - * @throws IOException + * @throws IOException if an I/O error occurs */ public ReversedLinesFileReader(final File file) throws IOException { this(file, 4096, Charset.defaultCharset().toString()); @@ -69,7 +69,7 @@ public class ReversedLinesFileReader imp * match with the block size of the underlying file system). * @param encoding * the encoding of the file - * @throws IOException + * @throws IOException if an I/O error occurs */ public ReversedLinesFileReader(final File file, final int blockSize, final String encoding) throws IOException { this.blockSize = blockSize; @@ -104,12 +104,15 @@ public class ReversedLinesFileReader imp // http://www.herongyang.com/Unicode/JIS-Shift-JIS-Encoding.html byteDecrement = 1; } else if(charset == Charset.forName("UTF-16BE") || charset == Charset.forName("UTF-16LE")) { - // UTF-16 new line sequences are not allowed as second tuple of four byte sequences, however byte order has to be specified + // UTF-16 new line sequences are not allowed as second tuple of four byte sequences, + // however byte order has to be specified byteDecrement = 2; } else if(charset == Charset.forName("UTF-16")) { - throw new UnsupportedEncodingException("For UTF-16, you need to specify the byte order (use UTF-16BE or UTF-16LE)"); + throw new UnsupportedEncodingException( + "For UTF-16, you need to specify the byte order (use UTF-16BE or UTF-16LE)"); } else { - throw new UnsupportedEncodingException("Encoding "+encoding+" is not supported yet (feel free to submit a patch)"); + throw new UnsupportedEncodingException( + "Encoding "+encoding+" is not supported yet (feel free to submit a patch)"); } // NOTE: The new line sequences are matched in the order given, so it is important that \r\n is BEFORE \n newLineSequences = new byte[][] { "\r\n".getBytes(encoding), "\n".getBytes(encoding), "\r".getBytes(encoding) }; @@ -122,7 +125,7 @@ public class ReversedLinesFileReader imp * Returns the lines of the file from bottom to top. * * @return the next line or null if the start of the file is reached - * @throws IOException + * @throws IOException if an I/O error occurs */ public String readLine() throws IOException { @@ -148,6 +151,8 @@ public class ReversedLinesFileReader imp /** * Closes underlying resources. + * + * @throws IOException if an I/O error occurs */ public void close() throws IOException { randomAccessFile.close();