java.lang.Object
net.i2p.router.naming.BlockfileNamingService.PropertiesSerializer
All Implemented Interfaces:
Serializer<Properties>
Enclosing class:
BlockfileNamingService

private static class BlockfileNamingService.PropertiesSerializerextends Object implements Serializer<Properties>
Used for the values in the header skiplist Take care not to throw on any error. This means that some things will fail with no indication other than the log, but if we threw a RuntimeException we would prevent access to entries later in the SkipSpan.
  • Constructor Details

    • PropertiesSerializer

      private PropertiesSerializer()
      Writes and reads the hosts.txt format.
  • Method Details

    • getBytes

      public byte[] getBytes(Properties p)
      Description copied from interface: Serializer
      o).
      Specified by:
      getBytes in interface Serializer<Properties>
      Parameters:
      p - the object to serialize
      Returns:
      the given object's serialized form as a byte array
    • construct

      public Properties construct(byte[] b)
      Deserialize the properties stored in an entry value, null on malformed data.
      Specified by:
      construct in interface Serializer<Properties>
      Parameters:
      b - the serialized bytes to read back
      Returns:
      the deserialized object