public class FileEventStream extends java.lang.Object implements ObjectStream<Event>
| Constructor and Description |
|---|
FileEventStream(java.io.File file)
Creates a new file event stream from the specified file.
|
FileEventStream(java.io.Reader reader) |
FileEventStream(java.lang.String fileName) |
FileEventStream(java.lang.String fileName,
java.lang.String encoding)
Creates a new file event stream from the specified file name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the
ObjectStream and releases all allocated
resources. |
Event |
read()
Returns the next object.
|
void |
reset()
Repositions the stream at the beginning and the previously seen object sequence
will be repeated exactly.
|
static java.lang.String |
toLine(Event event)
Generates a string representing the specified event.
|
public FileEventStream(java.lang.String fileName,
java.lang.String encoding)
throws java.io.IOException
fileName - the name fo the file containing the events.java.io.IOException - When the specified file can not be read.public FileEventStream(java.lang.String fileName)
throws java.io.IOException
java.io.IOExceptionpublic FileEventStream(java.io.Reader reader)
throws java.io.IOException
java.io.IOExceptionpublic FileEventStream(java.io.File file)
throws java.io.IOException
file - the file containing the events.java.io.IOException - When the specified file can not be read.public Event read() throws java.io.IOException
ObjectStreamread in interface ObjectStream<Event>java.io.IOException - if there is an error during readingpublic void close()
throws java.io.IOException
ObjectStreamObjectStream and releases all allocated
resources. After close was called its not allowed to call
read or reset.close in interface java.lang.AutoCloseableclose in interface ObjectStream<Event>java.io.IOException - if there is an error during closing the streampublic static java.lang.String toLine(Event event)
event - The event for which a string representation is needed.public void reset()
throws java.io.IOException,
java.lang.UnsupportedOperationException
ObjectStreamreset in interface ObjectStream<Event>java.io.IOException - if there is an error during reseting the streamjava.lang.UnsupportedOperationExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved