net.sf.beanlib.util
Class TextIterable
java.lang.Object
net.sf.beanlib.util.TextIterable
- All Implemented Interfaces:
- Closeable, Iterable<String>
@ThreadSafe
public class TextIterable
- extends Object
- implements Iterable<String>, Closeable
- Author:
- Hanson Char
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
url
private final URL url
openedIterators
private final List<LineIterator> openedIterators
returnNullUponEof
private volatile boolean returnNullUponEof
charsetname
private String charsetname
charset
private Charset charset
charsetDecoder
private CharsetDecoder charsetDecoder
TextIterable
public TextIterable(File file)
throws MalformedURLException
- Throws:
MalformedURLException
TextIterable
public TextIterable(URL url)
TextIterable
public TextIterable(String resourcePath)
iterator
public LineIterator iterator()
- Specified by:
iterator
in interface Iterable<String>
close
public void close()
- Specified by:
close
in interface Closeable
numberOfopenedIterators
public int numberOfopenedIterators()
removeLineIterator
void removeLineIterator(LineIterator li)
isReturnNullUponEof
public boolean isReturnNullUponEof()
setReturnNullUponEof
public void setReturnNullUponEof(boolean returnNullUponEof)
withReturnNullUponEof
public TextIterable withReturnNullUponEof(boolean returnNullUponEof)
getCharset
public Charset getCharset()
setCharset
public void setCharset(Charset charset)
withCharset
public TextIterable withCharset(Charset charset)
getCharsetDecoder
public CharsetDecoder getCharsetDecoder()
setCharsetDecoder
public void setCharsetDecoder(CharsetDecoder charsetDecoder)
withCharsetDecoder
public TextIterable withCharsetDecoder(CharsetDecoder charsetDecoder)
getCharsetname
public String getCharsetname()
setCharsetname
public void setCharsetname(String charsetname)
withCharsetname
public TextIterable withCharsetname(String charsetname)