|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.mvcsys.renscribe.EFile
Enscribe File
Field Summary | |
protected byte[] |
buffer
Puffer für OPEN_BUFFERED |
protected int |
bufferCount
Aktuelle Datenlaenge im Puffer |
protected int |
bufferPointer
Aktuelle Position im Puffer |
protected int |
bufferType
Art des Puffers Host.BUFFER_IS_OUTPUT Host.BUFFER_IS_INPUT Host.BUFFER_IS_IDLE |
protected int |
file
Filehandle |
String |
filename
Name der Datei |
int |
flags
Open-Modus etc. |
Host |
host
Host-Verbindung |
boolean |
isEof
Dateiende erreicht |
boolean |
isOpen
Datei ist offen |
EFile |
nextFile
Verkettung zur nächsten offenen Datei |
Constructor Summary | |
EFile()
|
Method Summary | |
int |
close()
Datei schliessen |
int |
control(int code,
int p1)
Control |
int |
flush()
Puffer leeren |
int |
keyspec(byte c1,
byte c2)
Erzeugen eines Key-Specifiers |
int |
keyspec(String spec)
Erzeugen eines Key-Specifiers |
int |
lockfile()
Locking der ganzen Datei |
int |
lseek(int value,
int mode)
Positionieren (Relative Byte Adresse oder Edit-Zeile) |
int |
ltell()
Position ermitteln |
String |
read()
String lesen |
int |
read(byte[] buffer,
int maxlen,
int lock_flag)
Satz sequentiell lesen |
String |
read(int lock_flag)
String lesen |
String |
readupdate()
String für Update lesen |
int |
readupdate(byte[] buffer,
int maxlen,
int lock_flag)
Satz für Update lesen |
String |
readupdate(int lock_flag)
String für Update lesen |
int |
seek(byte[] keyvalue,
int keyspec,
int keylen,
int cmplen,
int mode)
Positionieren auf Key. |
int |
seek(String keyvalue,
int keyspec,
int mode)
Positionieren auf Key (vereinfachte Parameter). |
int |
seek(String keyvalue,
String keyspec,
int mode)
Positionieren auf Key (vereinfachte Parameter). |
int |
setmode(int code,
int p1,
int p2,
short[] pold)
Setmode |
int |
unlockfile()
Locking der Datei aufheben |
int |
unlockrecord()
Locking des aktuellen Satzes aufheben |
int |
write(byte[] buffer,
int len)
Satz sequentiell schreiben |
int |
write(String s)
String schreiben. |
int |
writeread(byte[] buffer,
int writelen,
int readlen)
Satz mit Prompt lesen |
String |
writeread(String s,
int writelen,
int readlen)
String mit Prompt lesen |
int |
writeupdate(byte[] buffer,
int len,
int unlock)
Satz updaten |
int |
writeupdate(String s,
int unlock)
String updaten. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected byte[] buffer
protected int bufferCount
protected int bufferPointer
protected int bufferType
protected int file
public String filename
public int flags
public Host host
public boolean isEof
public boolean isOpen
public EFile nextFile
Constructor Detail |
public EFile()
Method Detail |
public int close() throws IOException
public int control(int code, int p1) throws IOException
code
- Art der Operationp1
- Parameterpublic int flush() throws IOException
public int keyspec(byte c1, byte c2)
c1
- linkes Bytec2
- rechtes Byteseek(byte[], int, int, int, int)
public int keyspec(String spec)
keyspec
- Key-Specifier als Zeichenkette (2 Zeichen)seek(byte[], int, int, int, int)
public int lockfile() throws IOException
public int lseek(int value, int mode) throws IOException
value
- Position in der Dateimode
- Host.SEEK_ABSOLUTE, Host.SEEK_RELATIVE oder Host.SEEK_ENDpublic int ltell() throws IOException
public String read() throws IOException
public int read(byte[] buffer, int maxlen, int lock_flag) throws IOException
buffer
- Puffer für die zu lesenden Datenmaxlen
- Maximale Anzahllock_flag
- Host.READ_LOCK oder Host.READ_NOLOCKpublic String read(int lock_flag) throws IOException
lockflag
- Host.READ_LOCK oder Host.READ_NOLOCKpublic String readupdate() throws IOException
public int readupdate(byte[] buffer, int maxlen, int lock_flag) throws IOException
buffer
- Puffer für die zu lesenden Datenmaxlen
- Maximale Anzahllock_flag
- Host.READ_LOCK oder Host.READ_NOLOCKpublic String readupdate(int lock_flag) throws IOException
lock_flag
- Host.READ_LOCK oder Host.READ_NOLOCKpublic int seek(byte[] keyvalue, int keyspec, int keylen, int cmplen, int mode) throws IOException
Positionieren auf Key.
Der passende Record wird sofort gelesen und gepuffert und steht dadurch beim nächsten Read unmittelbar zur Verfügungkeyvalue
- Vergleichswertkeyspec
- Key-Specifier, Keys der Form 'AB' muessen mit
keyspec() erzeugt werdenkeylen
- Länge des Keycmplen
- Länge des Vergleichswertesmode
- Bitweise Verknüpfung von Host.SEEK_APPROXIMATE,
Host.SEEK_GENERIC oder Host.SEEK_EXACT
mit Host.SEEK_SKIP, Host.SEEK_REVERSE, Host.SEEK_LOCK.public int seek(String keyvalue, int keyspec, int mode) throws IOException
Positionieren auf Key (vereinfachte Parameter).
keyvalue
- Vergleichswertkeyspec
- Key-Specifier als Zahlmode
- Bitweise Verknüpfung von Host.SEEK_APPROXIMATE,
Host.SEEK_GENERIC oder Host.SEEK_EXACT
mit Host.SEEK_SKIP, Host.SEEK_REVERSE, Host.SEEK_LOCK.public int seek(String keyvalue, String keyspec, int mode) throws IOException
Positionieren auf Key (vereinfachte Parameter).
keyvalue
- Vergleichswertkeyspec
- Key-Specifier der Form "AB"mode
- Bitweise Verknüpfung von Host.SEEK_APPROXIMATE,
Host.SEEK_GENERIC oder Host.SEEK_EXACT
mit Host.SEEK_SKIP, Host.SEEK_REVERSE, Host.SEEK_LOCK.public int setmode(int code, int p1, int p2, short[] pold) throws IOException
code
- Art der Operationp1
- 1. Parameterp2
- 2. Parameterpold
- Vorherige Werte der Parameterpublic int unlockfile() throws IOException
public int unlockrecord() throws IOException
public int write(byte[] buffer, int len) throws IOException
buffer
- Puffer mit den zu schreibenden Datenlen
- Anzahl der Bytepublic int write(String s) throws IOException
s
- Text der zu schreiben istpublic int writeread(byte[] buffer, int writelen, int readlen) throws IOException
buffer
- Puffer mit den zu schreibenden Daten (Prompt)
und den gelesenen Daten als Ergebniswritelen
- Anzahl der Byte, die geschrieben werden sollenreadlen
- Anzahl der Byte, die maximal gelesen werden sollenpublic String writeread(String s, int writelen, int readlen) throws IOException
s
- text mit den zu schreibenden Daten (Prompt)public int writeupdate(byte[] buffer, int len, int unlock) throws IOException
buffer
- Puffer mit den zu schreibenden Datenlen
- Anzahl der Bytepublic int writeupdate(String s, int unlock) throws IOException
s
- Text der zu schreiben ist
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |