Code example for ObjectInput

Methods: readUnsignedBytereadObject

0
         output.write(type);
      } 
       
      @Override 
      public NodeKey readObject(ObjectInput input) throws IOException, ClassNotFoundException {
         Fqn fqn = (Fqn) input.readObject();
         int typeb = input.readUnsignedByte();
         NodeKey.Type type = null; 
         switch (typeb) {
            case DATA_BYTE:
               type = DATA;
               break; 
            case STRUCTURE_BYTE:
               type = STRUCTURE;
               break; 
         } 
         return new NodeKey(fqn, type);
      } 
 
      @Override