Code example for DataOutput

Methods: writeDoublewriteUTF

0
        document = in.readUTF();
    } 
 
    @Override 
    public void write(DataOutput out) throws IOException {
        out.writeDouble(score);
        out.writeUTF(document);
    } 
 
    public String getDocument() {
        return document;
    } 
 
    public void setDocument(String document) {
        this.document = document;
    } 
 
    public double getScore() { 
        return score;
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE