this results in an exception wenn gunzipping an encfs stream:
java.io.IOException: org.mrpdaemon.sec.encfs.EncFSInputStream.read() returned value out of range -1..255: -117
at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:272)
read has to convert the byte to a positive int, eg by & 0xFF:
@Override
public int read() throws IOException {
byte[] oneByte = new byte[1];
int ret = this.read(oneByte, 0, 1);
if (ret == 1) {
return oneByte[0] & 0xFF;
}
return ret;
}
this results in an exception wenn gunzipping an encfs stream:
java.io.IOException: org.mrpdaemon.sec.encfs.EncFSInputStream.read() returned value out of range -1..255: -117 at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:272)
read has to convert the byte to a positive int, eg by & 0xFF:
@Override public int read() throws IOException { byte[] oneByte = new byte[1]; int ret = this.read(oneByte, 0, 1); if (ret == 1) { return oneByte[0] & 0xFF; } return ret; }