eID middleware |

# be.portugal.eid.PTEID_Card Class Reference

Base class for all the card types supported PTEID_ReaderContext.getCard() will return such an object. More...

Inheritance diagram for be.portugal.eid.PTEID_Card:

List of all members.

## Public Member Functions
synchronized void | delete ()
PTEID_CardType | getType () throws java.lang.Exception
| Return the type of the card.
PTEID_XMLDoc | getDocument (PTEID_DocumentType type) throws java.lang.Exception
| Get a document from the card.
PTEID_ByteArray | getRawData (PTEID_RawDataType type) throws java.lang.Exception
| Get the raw data file from the card.
PTEID_ByteArray | sendAPDU (PTEID_ByteArray cmd) throws java.lang.Exception
| Send an APDU command to the card and get the result.
PTEID_ByteArray | readFile (String fileID, long ulOffset, long ulMaxLength) throws java.lang.Exception
| Read a file from the card.
PTEID_ByteArray | readFile (String fileID, long ulOffset) throws java.lang.Exception
| Read a file from the card.
PTEID_ByteArray | readFile (String fileID) throws java.lang.Exception
| Read a file from the card.
boolean | writeFile (String fileID, PTEID_ByteArray oData, long ulOffset) throws java.lang.Exception
| Write to a file on the card.
boolean | writeFile (String fileID, PTEID_ByteArray oData) throws java.lang.Exception
| Write to a file on the card.
## Protected Member Functions
| PTEID_Card (long cPtr, boolean cMemoryOwn)
void | finalize ()
## Static Protected Member Functions
static long | getCPtr (PTEID_Card obj)

## Detailed Description

Base class for all the card types supported PTEID_ReaderContext.getCard() will return such an object.

## Constructor & Destructor Documentation

be.portugal.eid.PTEID_Card.PTEID_Card | ( | long | cPtr,
|  | boolean | cMemoryOwn |
| ) |  |  | `[protected]`

## Member Function Documentation

synchronized void be.portugal.eid.PTEID_Card.delete | ( |  | ) |

Reimplemented from be.portugal.eid.PTEID_Object.

Reimplemented in be.portugal.eid.PTEID_EIDCard, be.portugal.eid.PTEID_ForeignerCard, be.portugal.eid.PTEID_KidsCard, be.portugal.eid.PTEID_MemoryCard, be.portugal.eid.PTEID_SISCard, and be.portugal.eid.PTEID_SmartCard.

References be.portugal.eid.PTEID_Object.swigCMemOwn.

void be.portugal.eid.PTEID_Card.finalize | ( |  | ) | `[protected]`

Reimplemented from be.portugal.eid.PTEID_Object.

Reimplemented in be.portugal.eid.PTEID_EIDCard, be.portugal.eid.PTEID_ForeignerCard, be.portugal.eid.PTEID_KidsCard, be.portugal.eid.PTEID_MemoryCard, be.portugal.eid.PTEID_SISCard, and be.portugal.eid.PTEID_SmartCard.

static long be.portugal.eid.PTEID_Card.getCPtr | ( | PTEID_Card | obj | ) | `[static, protected]`

References be.portugal.eid.PTEID_Card.swigCPtr.

PTEID_XMLDoc be.portugal.eid.PTEID_Card.getDocument | ( | PTEID_DocumentType | type | ) | throws java.lang.Exception

Get a document from the card.

Throws PTEID_ExDocTypeUnknown exception if the document doesn't exist

Reimplemented in be.portugal.eid.PTEID_EIDCard, and be.portugal.eid.PTEID_SISCard.

PTEID_ByteArray be.portugal.eid.PTEID_Card.getRawData | ( | PTEID_RawDataType | type | ) | throws java.lang.Exception

Get the raw data file from the card.

Throws PTEID_ExFileTypeUnknown exception if the document doesn't exist

Reimplemented in be.portugal.eid.PTEID_EIDCard, and be.portugal.eid.PTEID_SISCard.

PTEID_CardType be.portugal.eid.PTEID_Card.getType | ( |  | ) | throws java.lang.Exception

Return the type of the card.

References be.portugal.eid.PTEID_CardType.swigToEnum().

PTEID_ByteArray be.portugal.eid.PTEID_Card.readFile | ( | String | fileID | ) | throws java.lang.Exception

Read a file from the card.

Parameters:

  | fileID | the path of the file

Returns:
  A PTEID_ByteArray with the content of the file

PTEID_ByteArray be.portugal.eid.PTEID_Card.readFile | ( | String | fileID,
|  | long | ulOffset |
| ) |  |  | throws java.lang.Exception

Read a file from the card.

Parameters:

  | fileID | the path of the file
  | ulOffset | the offset in the file start reading

Returns:
  A PTEID_ByteArray with the content of the file

PTEID_ByteArray be.portugal.eid.PTEID_Card.readFile | ( | String | fileID,
|  | long | ulOffset,
|  | long | ulMaxLength |
| ) |  |  | throws java.lang.Exception

Read a file from the card.

Parameters:

  | fileID | the path of the file
  | ulOffset | the offset in the file to start reading
  | ulMaxLength | the maximum number of bytes to read

Returns:
  A PTEID_ByteArray with the content of the file

PTEID_ByteArray be.portugal.eid.PTEID_Card.sendAPDU | ( | PTEID_ByteArray | cmd | ) | throws java.lang.Exception

Send an APDU command to the card and get the result.

Parameters:

  | cmd | the apdu command

Returns:
  PTEID_ByteArray containing the result

Reimplemented in be.portugal.eid.PTEID_SmartCard.

boolean be.portugal.eid.PTEID_Card.writeFile | ( | String | fileID,
|  | PTEID_ByteArray | oData |
| ) |  |  | throws java.lang.Exception

Write to a file on the card.

Parameters:

  | fileID | the path of the file
  | oData | contents the bytes to write

Reimplemented in be.portugal.eid.PTEID_SmartCard.

boolean be.portugal.eid.PTEID_Card.writeFile | ( | String | fileID,
|  | PTEID_ByteArray | oData,
|  | long | ulOffset |
| ) |  |  | throws java.lang.Exception

Write to a file on the card.

Parameters:

  | fileID | the path of the file
  | oData | contents the bytes to write
  | ulOffset | the offset to begin writing