Code example for ByteArrayInputStream

Methods: read

0
        public final int fileSize;
 
        private StandardDesfireFileSettings (ByteArrayInputStream stream) {
            super(stream);
            byte[] buf = new byte[3];
            stream.read(buf, 0, buf.length);
            ArrayUtils.reverse(buf);
            fileSize = Utils.byteArrayToInt(buf);
        } 
 
        StandardDesfireFileSettings (byte fileType, byte commSetting, byte[] accessRights, int fileSize) {
            super(fileType, commSetting, accessRights);
            this.fileSize = fileSize;
        } 
 
        @Override 
        public void writeToParcel (Parcel parcel, int flags) {
            super.writeToParcel(parcel, flags);
            parcel.writeInt(fileSize);
        } 
    }