Code example for ObjectOutput

Methods: writeByte, writeInt, writeObject, writeUTF

0
            throws IOException { 
        if (writeCsf) {
            if (csf == null) {
                out.writeByte(NULL_CSF);
            } else { 
                out.writeByte(NONNULL_CSF);
            } 
        } 
        out.writeUTF(host);
        out.writeInt(port);
 
        if (writeCsf && csf != null) {
            out.writeObject(csf);
        } 
    } 
 
    /** 
     * Reads data for creating Endpoint object from the specified input stream. 
     * 
     * @param in the stream to read data from 
     * @param readCsf do we need to read client-side factory or not