Ejemplo n.º 1
0
 public void readBytes(InputStream rawConfig) throws DataFormatException, IOException {
   _destination = Destination.create(rawConfig);
   _options = DataHelper.readProperties(rawConfig);
   _creationDate = DataHelper.readDate(rawConfig);
   _signature = new Signature();
   _signature.readBytes(rawConfig);
 }
Ejemplo n.º 2
0
 @Override
 protected void doReadMessage(InputStream in, int size) throws I2CPMessageException, IOException {
   try {
     _sessionId = new SessionId();
     _sessionId.readBytes(in);
     int numTunnels = (int) DataHelper.readLong(in, 1);
     _endpoints.clear();
     for (int i = 0; i < numTunnels; i++) {
       // Hash router = new Hash();
       // router.readBytes(in);
       Hash router = Hash.create(in);
       TunnelId tunnel = new TunnelId();
       tunnel.readBytes(in);
       _endpoints.add(new TunnelEndpoint(router, tunnel));
     }
     _end = DataHelper.readDate(in);
   } catch (DataFormatException dfe) {
     throw new I2CPMessageException("Unable to load the message data", dfe);
   }
 }