|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopennlp.tools.util.PlainTextByLineStream
public class PlainTextByLineStream
Reads a plain text file and return each line as a String
object.
Constructor Summary | |
---|---|
PlainTextByLineStream(java.nio.channels.FileChannel channel,
java.nio.charset.Charset encoding)
|
|
PlainTextByLineStream(java.nio.channels.FileChannel channel,
java.lang.String charsetName)
|
|
PlainTextByLineStream(java.io.InputStream in,
java.nio.charset.Charset charset)
|
|
PlainTextByLineStream(java.io.InputStream in,
java.lang.String charsetName)
|
|
PlainTextByLineStream(java.io.Reader in)
Initializes the current instance. |
Method Summary | |
---|---|
void |
close()
Closes the ObjectStream and releases all allocated
resources. |
java.lang.String |
read()
Returns the next object. |
void |
reset()
Repositions the stream at the beginning and the previously seen object sequence will be repeated exactly. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlainTextByLineStream(java.io.Reader in)
in
- public PlainTextByLineStream(java.io.InputStream in, java.lang.String charsetName) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public PlainTextByLineStream(java.io.InputStream in, java.nio.charset.Charset charset)
public PlainTextByLineStream(java.nio.channels.FileChannel channel, java.lang.String charsetName)
public PlainTextByLineStream(java.nio.channels.FileChannel channel, java.nio.charset.Charset encoding)
Method Detail |
---|
public java.lang.String read() throws java.io.IOException
ObjectStream
read
in interface ObjectStream<java.lang.String>
java.io.IOException
public void reset() throws java.io.IOException
ObjectStream
reset
in interface ObjectStream<java.lang.String>
java.io.IOException
public void close() throws java.io.IOException
ObjectStream
ObjectStream
and releases all allocated
resources. After close was called its not allowed to call
read or reset.
close
in interface ObjectStream<java.lang.String>
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |