Code example for DataInputStream

Methods: readBytereadDoublereadIntreadUTF

0
    } 
 
    public void load( DataInputStream in ) throws IOException {
        Version version = Version.read( in );
        version.checkCurrent();
        x = in.readDouble();
        y = in.readDouble();
        width = in.readDouble();
        height = in.readDouble();
    } 
     
    public void load( XElement element ) {
        x = element.getElement( "x" ).getDouble();
        y = element.getElement( "y" ).getDouble();
        width = element.getElement( "width" ).getDouble();
        height = element.getElement( "height" ).getDouble();
    } 
 
    /** 
     * Gets the height of the child. 
     * @return the height 
     * @see #setHeight(double) 
     */ 
    public double getHeight() { 
        return height;
    }