public class ReversedLinesFileReader
extends java.lang.Object
implements java.io.Closeable
Constructor and Description |
---|
ReversedLinesFileReader(java.io.File file)
Deprecated.
2.5 use
ReversedLinesFileReader(File, Charset) instead |
ReversedLinesFileReader(java.io.File file,
java.nio.charset.Charset charset)
Creates a ReversedLinesFileReader with default block size of 4KB and the
specified encoding.
|
ReversedLinesFileReader(java.io.File file,
int blockSize,
java.nio.charset.Charset encoding)
Creates a ReversedLinesFileReader with the given block size and encoding.
|
ReversedLinesFileReader(java.io.File file,
int blockSize,
java.lang.String encoding)
Creates a ReversedLinesFileReader with the given block size and encoding.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes underlying resources.
|
java.lang.String |
readLine()
Returns the lines of the file from bottom to top.
|
@Deprecated public ReversedLinesFileReader(java.io.File file) throws java.io.IOException
ReversedLinesFileReader(File, Charset)
insteadfile
- the file to be readjava.io.IOException
- if an I/O error occurspublic ReversedLinesFileReader(java.io.File file, java.nio.charset.Charset charset) throws java.io.IOException
file
- the file to be readcharset
- the encoding to usejava.io.IOException
- if an I/O error occurspublic ReversedLinesFileReader(java.io.File file, int blockSize, java.nio.charset.Charset encoding) throws java.io.IOException
file
- the file to be readblockSize
- size of the internal buffer (for ideal performance this should
match with the block size of the underlying file system).encoding
- the encoding of the filejava.io.IOException
- if an I/O error occurspublic ReversedLinesFileReader(java.io.File file, int blockSize, java.lang.String encoding) throws java.io.IOException
file
- the file to be readblockSize
- size of the internal buffer (for ideal performance this should
match with the block size of the underlying file system).encoding
- the encoding of the filejava.io.IOException
- if an I/O error occursjava.nio.charset.UnsupportedCharsetException
- thrown instead of UnsupportedEncodingException
in
version 2.2 if the encoding is not supported.public java.lang.String readLine() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
- if an I/O error occurs"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"