Java 8 InputStream - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 InputStream class.

This code example shows how to use the following methods:read_long
     * 
     * @param input the <code>InputStream</code> object containing CDR 
     *              formatted data from the wire 
     */ 
    public void _read(InputStream input) {
        value = input.read_long();
    } 
 
    /** 
     * Marshals the value in this <code>IntHolder</code> object's 
     * <code>value</code> field to the output stream <code>output</code>. 
     * 
     * @param output the <code>OutputStream</code> object that will contain 
     *               the CDR formatted data 
     */ 
    public void _write(OutputStream output) {
        output.write_long(value);
    } 
 
    /** 
3
CodeRank
This code example shows how to use the following methods:read_value
    private StreamableValueFactory(ValueType valueType) {
        this.valueType = valueType;
    } 
 
    public Serializable read_value(InputStream inputStream) {
        return inputStream.read_value(new ObjectByValue(valueType));
    } 
 
    public static void register(ORB orb, ValueType valueType) {
        orb.register_value_factory(valueType.getId(), new StreamableValueFactory(valueType));
    } 
} 
4
CodeRank
This code example shows how to use the following methods:read_Object
     * with the unmarshalled data. 
     * 
     * @param input the InputStream containing CDR formatted data from the wire. 
     */ 
    public void _read(InputStream input) {
        value = input.read_Object();
    } 
 
    /** 
     * Marshals to <code>output</code> the value in 
     * this <code>ObjectHolder</code> object. 
     * 
     * @param output the OutputStream which will contain the CDR formatted data. 
     */ 
    public void _write(OutputStream output) {
        output.write_Object(value);
    } 
 
    /** 
     * Returns the TypeCode corresponding to the value held in 
3
CodeRank
This code example shows how to use the following methods:read_char
     * with the unmarshalled data. 
     * 
     * @param input the InputStream containing CDR formatted data from the wire 
     */ 
    public void _read(InputStream input) {
        value = input.read_char();
    } 
 
    /** 
     * Marshals to <code>output</code> the value in 
     * this <code>CharHolder</code> object. 
     * 
     * @param output the OutputStream which will contain the CDR formatted data 
     */ 
    public void _write(OutputStream output) {
        output.write_char(value);
    } 
 
    /** 
     * Returns the <code>TypeCode</code> object  corresponding 
3
CodeRank
This code example shows how to use the following methods:read_short
     * with the unmarshalled data. 
     * 
     * @param input the InputStream containing CDR formatted data from the wire. 
     */ 
    public void _read(InputStream input) {
        value = input.read_short();
    } 
 
    /** 
     * Marshals to <code>output</code> the value in 
     * this <code>ShortHolder</code> object. 
     * 
     * @param output the OutputStream which will contain the CDR formatted data. 
     */ 
    public void _write(OutputStream output) {
        output.write_short(value);
    } 
 
    /** 
     * Returns the TypeCode corresponding to the value held in 
3
CodeRank
This code example shows how to use the following methods:read_string
     * the <code>value</code> field of this <code>StringHolder</code> object. 
     * 
     * @param input the InputStream containing CDR formatted data from the wire. 
     */ 
    public void _read(InputStream input) {
        value = input.read_string();
    } 
 
    /** 
     * Marshals the value held by this <code>StringHolder</code> object 
     * to the output stream  <code>output</code>. 
     * 
     * @param output the OutputStream which will contain the CDR formatted data. 
     */ 
    public void _write(OutputStream output) {
        output.write_string(value);
    } 
 
    /** 
     * Retrieves the <code>TypeCode</code> object that corresponds to 
3
CodeRank
This code example shows how to use the following methods:read_double
     * value member. 
     * 
     * @param input the <code>InputStream</code> to read from. 
     */ 
    public void _read(InputStream input) {
        value = input.read_double();
    } 
 
    /** 
     * Write the double value stored in this holder to an 
     * <code>OutputStream</code>. 
     * 
     * @param output the <code>OutputStream</code> to write into. 
     */ 
    public void _write(OutputStream output) {
        output.write_double(value);
    } 
 
    /** 
     * Return the <code>TypeCode</code> of this holder object. 
3
CodeRank
This code example shows how to use the following methods:read_boolean
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Boolean boolValue = Boolean.TRUE;
        writer.writeBoolean(boolValue);
         
        InputStream iStream = oStream.create_input_stream();
        boolean b = iStream.read_boolean();
        assertTrue(b == boolValue.booleanValue());
    } 
     
    @Test
    public void testWriteChar() { 
        OutputStream oStream = orb.create_output_stream();
         
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Character charValue = new Character('c');
        writer.writeChar(charValue);
         
        InputStream iStream = oStream.create_input_stream();
        char c = iStream.read_char();
        assertTrue(c == charValue.charValue());
4
CodeRank
This code example shows how to use the following methods:read_boolean
     * 
     * @param input the <code>InputStream</code> object containing 
     *              CDR formatted data from the wire 
     */ 
    public void _read(InputStream input) {
        value = input.read_boolean();
    } 
 
    /** 
     * Marshals the value in this <code>BooleanHolder</code> object's 
     * <code>value</code> field to the output stream <code>output</code>. 
     * 
     * @param output the OutputStream which will contain the CDR formatted data 
     */ 
    public void _write(OutputStream output) {
        output.write_boolean(value);
    } 
 
    /** 
     * Retrieves the <code>TypeCode</code> object that corresponds to the 
3
CodeRank
This code example shows how to use the following methods:read_longlong
     * with the unmarshalled data. 
     * 
     * @param input the InputStream containing CDR formatted data from the wire 
     */ 
    public void _read(InputStream input) {
        value = input.read_longlong();
    } 
 
    /** 
     * Marshals to <code>output</code> the value in the Holder. 
     * 
     * @param output the OutputStream which will contain the CDR formatted data 
     */ 
    public void _write(OutputStream output) {
        output.write_longlong(value);
    } 
 
    /** 
     * Returns the <code>TypeCode</code> object 
     * corresponding to the value held in the Holder. 
3
CodeRank
See Code Examples for Java 8 InputStream Methods: