opencard.opt.iso.fs
Class CardFileFileID
java.lang.Object
|
+--opencard.opt.iso.fs.CardFilePathComponent
|
+--opencard.opt.iso.fs.CardFileFileID
- public class CardFileFileID
- extends CardFilePathComponent
CardFileFileID contains a single CardFilePath
component, a two byte file ID.
Field Summary |
protected byte[] |
fileID
Cache the two byte file ID for fast access |
Constructor Summary |
CardFileFileID(byte hi,
byte lo)
Instantiate a file ID path component. |
CardFileFileID(short fileID)
Instantiate a file ID path component. |
CardFileFileID(java.lang.String comp)
Instantiate a file ID path component. |
Method Summary |
boolean |
equals(java.lang.Object comp)
Compare two file ID components. |
int |
hashCode()
Return a hashcode for this file ID component |
byte[] |
toByteArray()
Return the byte array representing this component. |
void |
toByteArray(byte[] bites,
int off)
Fill in the byte array that represents this component. |
short |
toShort()
Return the short representation of this component. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
fileID
protected byte[] fileID
- Cache the two byte file ID for fast access
CardFileFileID
public CardFileFileID(java.lang.String comp)
- Instantiate a file ID path component.
- Parameters:
comp
- The String containing the path component.
CardFileFileID
public CardFileFileID(short fileID)
- Instantiate a file ID path component.
- Parameters:
fileID
- A short containing the file ID.
CardFileFileID
public CardFileFileID(byte hi,
byte lo)
- Instantiate a file ID path component.
- Parameters:
hi
- The high byte of the fileID (e.g., 0xCA for :CAFE)lo
- The low byte of the fileID (e.g., 0xFE for :CAFE)
toShort
public short toShort()
- Return the short representation of this component.
- Returns:
- A short representing this component.
toByteArray
public byte[] toByteArray()
- Return the byte array representing this component.
- Returns:
- A byte array that represents this component.
toByteArray
public void toByteArray(byte[] bites,
int off)
- Fill in the byte array that represents this component.
- Parameters:
bites
- The target byte array.off
- The offset into the target byte array.
equals
public boolean equals(java.lang.Object comp)
- Compare two file ID components.
- Parameters:
comp
- An object of type CardFileFileID.- Returns:
- True if comp is of type CardFilePathComponent
and describes the same path component.
- Overrides:
- equals in class CardFilePathComponent
hashCode
public int hashCode()
- Return a hashcode for this file ID component
- Overrides:
- hashCode in class java.lang.Object