Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## opencard.opt.iso.fs
Class CardRandomAccess

    java.lang.Object
      |
      +--opencard.opt.iso.fs.CardRandomAccess

Direct Known Subclasses:
  CardRandomByteAccess, CardRandomRecordAccess

public abstract class CardRandomAccess
extends java.lang.Object

Superclass for both `CardRandomAccess` classes.

See Also:
  `CardRandomRecordAccess`, `CardRandomByteAccess`

Field Summary
`protected CardFile` | `file`
`protected int` | `filePointer`
`protected FileAccessCardService` | `fileSystem`
`protected boolean` | `open`
`protected boolean` | `writeAccess`

Constructor Summary
`CardRandomAccess(CardFile scFile, java.lang.String accessMode)` Instantiate a `CardRandomAccess` object.

Method Summary
`void` | `close()` Close the file.
`protected void` | `finalize()` Free up all resources at garbage collection time.
`void` | `open()` (Re-)open the file.

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### file

    protected CardFile file

### fileSystem

    protected FileAccessCardService fileSystem

### filePointer

    protected int filePointer

### writeAccess

    protected boolean writeAccess

### open

    protected boolean open

Constructor Detail

### CardRandomAccess

    public CardRandomAccess(CardFile scFile,
                            java.lang.String accessMode)
                     throws opencard.core.terminal.CardTerminalException,
                            java.io.IOException

  Instantiate a `CardRandomAccess` object.
  Parameters:
    `scFile` - The `CardFile` object that represents the file on the smart card.
    `accessMode` - Specifies whether the card is accessed for read "r" or read and write "rw".
  Throws:
    opencard.core.terminal.CardTerminalException - Thrown when the smart card has been removed.

Method Detail

### close

    public void close()
               throws java.io.IOException,
                      opencard.core.terminal.CardTerminalException

  Close the file.
  Throws:
    java.io.IOException - Thrown if an I/O error has occurred.
    opencard.core.terminal.CardTerminalException - Thrown when the smart card has been removed.

### open

    public void open()
              throws java.io.IOException,
                     opencard.core.terminal.CardTerminalException

  (Re-)open the file.
  Throws:
    java.io.IOException - Thrown if an I/O error has occured.
    opencard.core.terminal.CardTerminalException - Thrown when the smart card has been removed.

### finalize

    protected void finalize()
                     throws java.io.IOException

  Free up all resources at garbage collection time.
  Throws:
    java.io.IOException - An I/O error occurred.
  Overrides:
    finalize in class java.lang.Object

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD