if(arg != null) { outstream.write(1); arg.writeTo(outstream); } else { outstream.write(0); }
Util.writeStreamable(arg, outstream);
    public void writeTo(DataOutputStream outstream) throws IOException {        outstream.writeByte(type);        if(arg != null) {            outstream.write(1);            arg.writeTo(outstream);        }        else {            outstream.write(0);        }    }