Code example for ByteArrayInputStream

Methods: read

0
        else 
            throw new Exception("Unknown file type: " + Integer.toHexString(fileType));
    } 
 
    private DesfireFileSettings (ByteArrayInputStream stream) {
        fileType    = (byte) stream.read();
        commSetting = (byte) stream.read();
 
        accessRights = new byte[2];
        stream.read(accessRights, 0, accessRights.length);
    } 
 
    private DesfireFileSettings (byte fileType, byte commSetting, byte[] accessRights) {
        this.fileType     = fileType;
        this.commSetting  = commSetting;
        this.accessRights = accessRights;
    } 
 
    public String getFileTypeName () {
        switch (fileType) {
            case STANDARD_DATA_FILE: