code: public static Field read(DataInputStream is) throws IOException {
          final byte tag = is.readByte();
          final Field result;
          switch (tag) {
              case 0x0f:
              case 0x10:
              case 0x11:
                  result = new NumberField(tag, is);
                  break;
  
              case 0x14:
                  result =  new BinaryField(is);
                  break;
  
              case 0x26:
                  result = new StringField(is);
                  break;
  
              default:
                  throw new IOException("Unable to read a field with type tag " + tag);
          }
  
          logger.debug("..received> {}", result);
          return result;
      }
docs: Read a field from the supplied stream, starting with the tag that identifies the type, and reading enough
  to collect the corresponding value.
  
  @param is the stream on which a type tag is expected to be the next byte, followed by the field value.
  
  @return the field that was found on the stream.
  
  @throws IOException if there is a problem reading the field.