private RequestIdentifier readRequestIdentifier(DataInput is) throws IOException { short length = is.readShort(); if(length <= 0) return null; byte[] buf = new byte[length]; try { checker.readAndChecksum(is, buf, 0, length); } catch (ChecksumFailedException e) { Logger.error(this, "Checksum failed reading RequestIdentifier. This is not serious but means we will have to read the next request even if we don't need it."); return null; } DataInputStream dis = new DataInputStream(new ByteArrayInputStream(buf)); try { return new RequestIdentifier(dis); } catch (IOException e) { Logger.error(this, "Failed to parse RequestIdentifier in spite of valid checksum (probably a bug): "+e, e); return null; } }
byte[] salt = new byte[32]; try { checker.readAndChecksum(ois, salt, 0, salt.length); loaded.setSalt(salt); } catch (ChecksumFailedException e1) {