ObjectInputStream readBoolean - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ObjectInputStream readBoolean method.

This code example shows how to use the following methods:readBoolean, readFloat, readInt, readObject
 
        if (stream == null) {
            throw new IllegalArgumentException("Null 'stream' argument.");
        } 
        Stroke result = null;
        final boolean isNull = stream.readBoolean();
        if (!isNull) {
            final Class c = (Class) stream.readObject();
            if (c.equals(BasicStroke.class)) {
                final float width = stream.readFloat();
                final int cap = stream.readInt();
                final int join = stream.readInt();
                final float miterLimit = stream.readFloat();
                final float[] dash = (float[]) stream.readObject();
                final float dashPhase = stream.readFloat();
                result = new BasicStroke(
                    width, cap, join, miterLimit, dash, dashPhase
                ); 
            } 
            else { 

8
CodeRank
This code example shows how to use the following methods:defaultReadObject, readBoolean, readFloat, readObject
 
    /** 
     * Draws the block within the specified area. 
     * 
     * @param g2  the graphics device. 
     * @param area  the area. 
     * @param params  ignored (<code>null</code> permitted). 
     * 
     * @return Always <code>null</code>. 
     */ 
    public Object draw(Graphics2D g2, Rectangle2D area, Object params) {
        draw(g2, area);
        return null; 
    } 
 
    /** 
     * Tests this block for equality with an arbitrary object. 
     * 
     * @param obj  the object (<code>null</code> permitted). 
     * 

8
CodeRank
This code example shows how to use the following methods:defaultReadObject, readBoolean, readFloat, readInt, readObject
    public RectangleInsets getInsets() { 
        return this.insets;
    } 
 
    /** 
     * Returns the stroke. 
     * 
     * @return The stroke (never <code>null</code>). 
     */ 
    public Stroke getStroke() {
        return this.stroke;
    } 
 
    /** 
     * Draws the border by filling in the reserved space (in black). 
     * 
     * @param g2  the graphics device. 
     * @param area  the area. 
     */ 
    public void draw(Graphics2D g2, Rectangle2D area) {

8
CodeRank
This code example shows how to use the following methods:defaultReadObject, readBoolean, readFloat, readInt, readObject
 
    /** 
     * Returns the range. 
     * 
     * @return The range (never <code>null</code>). 
     */ 
    public Range getRange() {
        return this.range;
    } 
 
    /** 
     * Returns the background paint.  If <code>null</code>, the background 
     * should remain unfilled. 
     * 
     * @return The background paint (possibly <code>null</code>). 
     */ 
    public Paint getBackgroundPaint() {
        return this.backgroundPaint;
    } 
 

7
CodeRank
This code example shows how to use the following methods:readBoolean, readInt, readObject
This code example shows how to use the following methods:defaultReadObject, readBoolean, readFloat, readObject
     * @return The paint (never <code>null</code>). 
     * 
     * @see #setSubLabelPaint(Paint) 
     */ 
    public Paint getSubLabelPaint() {
        return this.sublabelPaint;
    } 
 
    /** 
     * Sets the paint for the sublabels and sends an {@link AxisChangeEvent} 
     * to all registered listeners. 
     * 
     * @param paint  the paint (<code>null</code> not permitted). 
     * 
     * @see #getSubLabelPaint() 
     */ 
    public void setSubLabelPaint(Paint paint) {
        if (paint == null) {
            throw new IllegalArgumentException("Null 'paint' argument.");
        } 

8
CodeRank
This code example shows how to use the following methods:defaultReadObject, readBoolean, readInt, readUTF
            out.writeObject(socketAddress);
        } 
    } 
 
    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();
 
        String uuid = in.readUTF();
 
        boolean isImpl = in.readBoolean();
        if (isImpl) {
            String host = in.readUTF();
            int port = in.readInt();
            member = new MemberImpl(new Address(host, port), false, uuid, null);
        } else { 
            InetSocketAddress socketAddress = (InetSocketAddress) in.readObject();
            member = new MemberImpl(new Address(socketAddress), false, uuid, null);
        } 
    } 
} 
7
CodeRank
This code example shows how to use the following methods:defaultReadObject, readBoolean, readFloat, readInt, readObject
    /** The arrow width (in Java2D units, per side). */ 
    private double arrowWidth;
 
    /** The arrow stroke. */ 
    private transient Stroke arrowStroke;
 
    /** The arrow paint. */ 
    private transient Paint arrowPaint;
 
    /** The radius from the base point to the anchor point for the label. */ 
    private double labelOffset;
 
    /** 
     * Creates a new label and arrow annotation. 
     * 
     * @param label  the label (<code>null</code> permitted). 
     * @param key  the category key. 
     * @param value  the y-value (measured against the chart's range axis). 
     * @param angle  the angle of the arrow's line (in radians). 
     */ 

7
CodeRank
This code example shows how to use the following methods:defaultReadObject, readBoolean, readFloat, readInt, readObject
    } 
 
    /** 
     * Creates a text box. 
     * 
     * @param text  the text. 
     */ 
    public TextBox(String text) {
        this((TextBlock) null); 
        if (text != null) {
            this.textBlock = new TextBlock();
            this.textBlock.addLine(text, new Font("SansSerif", Font.PLAIN, 10),
                    Color.BLACK);
        } 
    } 
 
    /** 
     * Creates a new text box. 
     * 
     * @param block  the text block. 

7
CodeRank
This code example shows how to use the following methods:readBoolean, readFields, readFully, readInt, readUTF
            oos.writeBoolean(false);
        } 
    } 
 
    private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
        ois.readFields();
 
        if (ois.readBoolean()) {
            userName = ois.readUTF();
        } 
 
        // 
        if (ois.readBoolean()) {
            int size = ois.readInt();
            byte[] bytes = new byte[size];
            ois.readFully(bytes);
            serialization = bytes;
        } else { 
            serialization = null;
        } 
 
6
CodeRank

Related ObjectInputStream readBoolean Questions & Answers:

readBoolean Method Overview
Reads in a boolean.
See Code Examples for other Java 8 ObjectInputStream Methods: