Azure, Java: Read and Unzip a file which is saved in Azure Storage (Blobs) and encoded by Avro
问题 I have a file in Azure Storage which is zipped and then encoded by Avro as Blob. I read it and decode it as you see in the following code: public static int decodeAvroFile(String avroFile) throws Exception { GenericDatumReader<Object> reader=new GenericDatumReader<Object>(); org.apache.avro.file.FileReader<Object> fileReader= DataFileReader.openReader(new File(avroFile),reader); ByteArrayOutputStream os = new ByteArrayOutputStream(); try { Schema schema=fileReader.getSchema(); DatumWriter