虽然解压缩adhaar qr代码示例数据步骤如下 https://uidai.gov.in/images/resource/User_manulal_QR_Code_15032019.pdf,但我得到了java.util.zip.DataFormatException: incorrect header check error while decompressing the byte array
// getting aadhaar sample qr code data from
// https://uidai.gov.in/images/resource/User_manulal_QR_Code_15032019.pdf
String s ="taking here Aadhaar sample qr code data";
BigInteger bi = new BigInteger(s, 10);
byte[] array = bi.toByteArray();
Inflater decompresser = new Inflater(true);
decompresser.setInput(array);
ByteArrayOutputStream outputStream = new
ByteArrayOutputStream(array.length);
byte[] buffer = new byte[1024];
while (!decompresser.finished()) {
int count = decompresser.inflate(buffer);
outputStream.write(buffer, 0, count);
}
outputStream.close();
byte[] output = outputStream.toByteArray();
String st = new String(output, 0, 255, "ISO-8859-1");
System.out.println("==========="+st);
森栏
犯罪嫌疑人X
繁华开满天机
随时随地看视频慕课网APP
相关分类