Code example for DataOutput

Methods: writeUTF

0
        this.label = TYPE_MAP.get(label);
    } 
 
    public void write(final DataOutput out) throws IOException {
        super.write(out);
        WritableUtils.writeVLong(out, this.inVertex);
        WritableUtils.writeVLong(out, this.outVertex);
        //WritableUtils.writeCompressedString(out,this.getLabel()); 
        out.writeUTF(this.label);
    } 
 
    public void readFields(final DataInput in) throws IOException {
        super.readFields(in);
        this.inVertex = WritableUtils.readVLong(in);
        this.outVertex = WritableUtils.readVLong(in);
        //setLabel(WritableUtils.readCompressedString(in)); 
        setLabel(in.readUTF());
    } 
 
    public void writeCompressed(final DataOutput out, final Direction idToWrite) throws IOException {
        super.write(out);