Package com.facebook.util.serialization

Examples of com.facebook.util.serialization.SerDeException


    public void serialize(Datum value, DataOutput out)
      throws SerDeException {
      try {
        out.writeUTF(value.asString());
      } catch (IOException e) {
        throw new SerDeException(e);
      }
    }
View Full Code Here


    @Override
    public Datum deserialize(DataInput in) throws SerDeException {
      try {
        return new IntegerDatum(in.readInt());
      } catch (IOException e) {
        throw new SerDeException(e);
      }
    }
View Full Code Here

    public void serialize(Datum value, DataOutput out)
      throws SerDeException {
      try {
        out.writeInt(value.asInteger());
      } catch (IOException e) {
        throw new SerDeException(e);
      }
    }
View Full Code Here

      SerDe<Datum> serDe = datumType.getSerDe();
     
      // invariant: the SerDe for any Datum will NOT read its own type
      return serDe.deserialize(in);
    } catch (IOException e) {
      throw new SerDeException(e);
    }
  }
View Full Code Here

    try {
      // invariant: the SerDe for any Datum will NOT write its own type
      out.writeByte(datumType.getTypeAsByte());
      serDe.serialize(value, out);
    } catch (IOException e) {
      throw new SerDeException(e);
    }
  }
View Full Code Here

    @Override
    public Datum deserialize(DataInput in) throws SerDeException {
      try {
        return new FloatDatum(in.readFloat());
      } catch (IOException e) {
        throw new SerDeException(e);
      }
    }
View Full Code Here

    public void serialize(Datum value, DataOutput out)
      throws SerDeException {
      try {
        out.writeFloat(value.asFloat());
      } catch (IOException e) {
        throw new SerDeException(e);
      }
    }
View Full Code Here

        in
    ) throws SerDeException {
      try {
        return new BooleanDatum(in.readBoolean());
      } catch (IOException e) {
        throw new SerDeException(e);
      }
    }
View Full Code Here

    public void serialize(Datum value, DataOutput out)
      throws SerDeException {
      try {
        out.writeBoolean(value.asBoolean());
      } catch (Exception e) {
        throw new SerDeException(e);
      }
    }
View Full Code Here

    @Override
    public Datum deserialize(DataInput in) throws SerDeException {
      try {
        return new LongDatum(in.readLong());
      } catch (IOException e) {
        throw new SerDeException(e);
      }
    }
View Full Code Here

TOP

Related Classes of com.facebook.util.serialization.SerDeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.