public class ProtocolInputStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
_alreadyRead
Wurde das Protokoll bereits abgerufen?
|
private static Debug |
_debug
Debug Ausgabe
|
(package private) java.io.File |
_file
Dateiname des Protokolls.
|
private java.io.ObjectInputStream |
_ois
Stream auf Protokolldatei.
|
private java.lang.String |
_path
Verzeichnis, in dem die Protokolldatei abgelegt ist.
|
private long |
_protocolId
Protokoll-Id
|
Constructor and Description |
---|
ProtocolInputStream(long protocolId,
java.lang.String path)
Öffnet eine Protokolldatei.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Beendet den Zugriff auf das Protokoll.
|
void |
closeAndRename()
Beendet den Zugriff auf das Protokoll und nennt das Protokoll in ein gespeichertes Protokoll um.
|
ProtocolResult |
take()
Liefert den nächsten Datensatz, der im Protokoll gespeichert ist.
|
private static final Debug _debug
private java.io.ObjectInputStream _ois
private final java.lang.String _path
private final long _protocolId
private final boolean _alreadyRead
java.io.File _file
public ProtocolInputStream(long protocolId, java.lang.String path) throws FailureException
protocolId
- protocolId für die Datei, in die geschrieben werden soll.path
- Verzeichnis, in dem das Protokoll abgelegt werden soll. Muss auf File.separator
enden.FailureException
- Fehler beim Zugriff auf die Datei.public ProtocolResult take() throws FailureException
null
wenn alle Datensätze abgefragt wurden.FailureException
- Fehler beim Zugriff auf die protokolldatei.public void close()
public void closeAndRename() throws NoncriticalException
NoncriticalException