|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--opencard.opt.iso.fs.CardRandomAccess
|
+--opencard.opt.iso.fs.CardRandomByteAccess
CardRandomByteAccess provides a byte-oriented way of accessing a card file (for transparent smart card files).
CardFile,
java.io.RandomAccessFile,
DataInput,
DataOutput| Fields inherited from class opencard.opt.iso.fs.CardRandomAccess |
file,
filePointer,
fileSystem,
open,
writeAccess |
| Constructor Summary | |
CardRandomByteAccess(CardFile scFile)
Instantiate a CardRandomByteAccess object. |
|
CardRandomByteAccess(CardFile scFile,
java.lang.String accessMode)
Instantiate a CardRandomByteAccess object. |
|
| Method Summary | |
protected void |
finalize()
Let the super class free any resources. |
int |
read()
Reads a byte of data. |
int |
read(byte[] b)
Reads data into an array of bytes. |
int |
read(byte[] b,
int off,
int len)
Reads a sub array as a sequence of bytes. |
boolean |
readBoolean()
Reads a boolean. |
byte |
readByte()
Reads a byte. |
char |
readChar()
Reads a 16 bit char. |
double |
readDouble()
Reads a 64 bit double. |
float |
readFloat()
Reads a 32 bit float. |
void |
readFully(byte[] b)
Reads bytes, blocking until all bytes are read. |
void |
readFully(byte[] b,
int off,
int len)
Reads bytes, blocking until all bytes are read. |
int |
readInt()
Reads a 32 bit int. |
java.lang.String |
readLine()
Reads a line terminated by a '\n' or EOF. |
long |
readLong()
Reads a 64 bit long. |
short |
readShort()
Reads a 16 bit short. |
int |
readUnsignedByte()
Reads an unsigned 8 bit byte. |
int |
readUnsignedShort()
Reads 16 bit unsigned short. |
java.lang.String |
readUTF()
Reads a UTF formatted String. |
int |
skipBytes(int n)
Skips the number of bytes specified. |
void |
write(byte[] b)
Writes an array of bytes. |
void |
write(byte[] b,
int off,
int len)
Writes a slice of a byte array. |
void |
write(int b)
Writes a byte of data. |
void |
writeBoolean(boolean v)
Writes a boolean. |
void |
writeByte(int v)
Writes a byte. |
void |
writeBytes(java.lang.String s)
Write a String as a sequence of bytes. |
void |
writeChar(int v)
Writes a character. |
void |
writeChars(java.lang.String s)
Writes a String as a sequence of chars. |
void |
writeDouble(double v)
Writes a double. |
void |
writeFloat(float v)
Writes a float. |
void |
writeInt(int v)
Write an integer. |
void |
writeLong(long v)
Writes a long. |
void |
writeShort(int v)
Writes a short. |
void |
writeUTF(java.lang.String str)
Writes a String in UTF format. |
| Methods inherited from class opencard.opt.iso.fs.CardRandomAccess |
close,
open |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public CardRandomByteAccess(CardFile scFile)
throws opencard.core.terminal.CardTerminalException,
java.io.IOException
scFile - The CardFile object that represents the file on the
smart card.
public CardRandomByteAccess(CardFile scFile,
java.lang.String accessMode)
throws opencard.core.terminal.CardTerminalException,
java.io.IOException
scFile - The CardFile object that represents the file on the
smart card.accessMode - Specifies whether the card is accessed for read "r" or read/write "rw".| Method Detail |
public int read()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public int read(byte[] b)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
b - A buffer to put the data into.
public int read(byte[] b,
int off,
int len)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
b - the buffer to read the data intooff - The start offset in the data bufferlen - The number of bytes to read
public boolean readBoolean()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public byte readByte()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public char readChar()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public double readDouble()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public float readFloat()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public void readFully(byte[] b)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
b - The buffer into which the data is read
public void readFully(byte[] b,
int off,
int len)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
b - The buffer into which the data is readoff - The start offset of the datalen - The number of bytes to read
public int readInt()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public java.lang.String readLine()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public long readLong()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public short readShort()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public int readUnsignedByte()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public int readUnsignedShort()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public int skipBytes(int n)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
n - The number of bytes to skip
public java.lang.String readUTF()
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
public void write(int b)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
b - The byte to be written
public void write(byte[] b)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
b - The data to be written
public void write(byte[] b,
int off,
int len)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
b - The data to be writtenoff - The start offset in the datalen - The number of bytes that are written
public void writeBoolean(boolean v)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
v - The boolean value
public void writeByte(int v)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
v - The byte to write.
public void writeBytes(java.lang.String s)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
s - The String to write.
public void writeChar(int v)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
v - The char to write
public void writeChars(java.lang.String s)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
s - The String to write.
public void writeDouble(double v)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
v - The double to write.
public void writeFloat(float v)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
v - The float to write
public void writeInt(int v)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
v - The integer to write.
public void writeLong(long v)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
v - The long to write.
public void writeShort(int v)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
v - The short to write
public void writeUTF(java.lang.String str)
throws java.io.IOException,
opencard.core.terminal.CardTerminalException
str - The String to write.
protected void finalize()
throws java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||