Shall we regard it as a bug that method readLine of class
RandomAccessFile fails to treat \\r and \\r\\n as line terminators?
=========================================================================
RandomAccessFile.readLine() reads a line of text.
If the line contains \r\n , it includes only '\r' in the returned String.
Whereas the documentation says,
"The line-terminating character(s), if any, are included as part of the string returned."
RandomAccessFile fails to treat \\r and \\r\\n as line terminators?
=========================================================================
RandomAccessFile.readLine() reads a line of text.
If the line contains \r\n , it includes only '\r' in the returned String.
Whereas the documentation says,
"The line-terminating character(s), if any, are included as part of the string returned."
- duplicates
-
JDK-4109353 java.io.RandomAccessFile behavior conflicts with documentation
- Closed