public static Trailer readGZipTrailer(ByteBuffer buf) throws DataFormatException { if (buf.remaining() < TRAILER_SIZE) { throw new DataFormatException("No GZIP trailer"); } Trailer t = new Trailer(); t.setChecksum(readUInt32LE(buf)); t.setLength(readUInt32LE(buf)); return t; }