Java Code Examples for com.sun.corba.se.impl.encoding.TypeCodeOutputStream#wrapOutputStream()

The following examples show how to use com.sun.corba.se.impl.encoding.TypeCodeOutputStream#wrapOutputStream() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TypeCodeImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public void write_value(OutputStream os) {
    // Wrap OutputStream into TypeCodeOutputStream.
    // This test shouldn't be necessary according to the Java language spec.
    if (os instanceof TypeCodeOutputStream) {
        this.write_value((TypeCodeOutputStream)os);
    } else {
        TypeCodeOutputStream wrapperOutStream = null;

        if (outBuffer == null) {
            wrapperOutStream = TypeCodeOutputStream.wrapOutputStream(os);
            this.write_value(wrapperOutStream);
            if (cachingEnabled) {
                // Cache the buffer for repeated writes
                outBuffer = wrapperOutStream.getTypeCodeBuffer();
                //if (outBuffer != null)
                    //System.out.println("Caching outBuffer with length = " +
                    //outBuffer.length + " for id = " + _id);
            }
        } else {
            //System.out.println("Using cached outBuffer: length = " + outBuffer.length +
                               //", id = " + _id);
        }
        // Write the first 4 bytes first to trigger alignment.
        // We know that it is the kind.
        if (cachingEnabled && outBuffer != null) {
            os.write_long(_kind);
            os.write_octet_array(outBuffer, 0, outBuffer.length);
        } else {
            //System.out.println("Buffer is empty for " + _id);
            wrapperOutStream.writeRawBuffer(os, _kind);
        }
    }
}
 
Example 2
Source File: TypeCodeImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void write_value(OutputStream os) {
    // Wrap OutputStream into TypeCodeOutputStream.
    // This test shouldn't be necessary according to the Java language spec.
    if (os instanceof TypeCodeOutputStream) {
        this.write_value((TypeCodeOutputStream)os);
    } else {
        TypeCodeOutputStream wrapperOutStream = null;

        if (outBuffer == null) {
            wrapperOutStream = TypeCodeOutputStream.wrapOutputStream(os);
            this.write_value(wrapperOutStream);
            if (cachingEnabled) {
                // Cache the buffer for repeated writes
                outBuffer = wrapperOutStream.getTypeCodeBuffer();
                //if (outBuffer != null)
                    //System.out.println("Caching outBuffer with length = " +
                    //outBuffer.length + " for id = " + _id);
            }
        } else {
            //System.out.println("Using cached outBuffer: length = " + outBuffer.length +
                               //", id = " + _id);
        }
        // Write the first 4 bytes first to trigger alignment.
        // We know that it is the kind.
        if (cachingEnabled && outBuffer != null) {
            os.write_long(_kind);
            os.write_octet_array(outBuffer, 0, outBuffer.length);
        } else {
            //System.out.println("Buffer is empty for " + _id);
            wrapperOutStream.writeRawBuffer(os, _kind);
        }
    }
}
 
Example 3
Source File: TypeCodeImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void write_value(OutputStream os) {
    // Wrap OutputStream into TypeCodeOutputStream.
    // This test shouldn't be necessary according to the Java language spec.
    if (os instanceof TypeCodeOutputStream) {
        this.write_value((TypeCodeOutputStream)os);
    } else {
        TypeCodeOutputStream wrapperOutStream = null;

        if (outBuffer == null) {
            wrapperOutStream = TypeCodeOutputStream.wrapOutputStream(os);
            this.write_value(wrapperOutStream);
            if (cachingEnabled) {
                // Cache the buffer for repeated writes
                outBuffer = wrapperOutStream.getTypeCodeBuffer();
                //if (outBuffer != null)
                    //System.out.println("Caching outBuffer with length = " +
                    //outBuffer.length + " for id = " + _id);
            }
        } else {
            //System.out.println("Using cached outBuffer: length = " + outBuffer.length +
                               //", id = " + _id);
        }
        // Write the first 4 bytes first to trigger alignment.
        // We know that it is the kind.
        if (cachingEnabled && outBuffer != null) {
            os.write_long(_kind);
            os.write_octet_array(outBuffer, 0, outBuffer.length);
        } else {
            //System.out.println("Buffer is empty for " + _id);
            wrapperOutStream.writeRawBuffer(os, _kind);
        }
    }
}
 
Example 4
Source File: TypeCodeImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void write_value(OutputStream os) {
    // Wrap OutputStream into TypeCodeOutputStream.
    // This test shouldn't be necessary according to the Java language spec.
    if (os instanceof TypeCodeOutputStream) {
        this.write_value((TypeCodeOutputStream)os);
    } else {
        TypeCodeOutputStream wrapperOutStream = null;

        if (outBuffer == null) {
            wrapperOutStream = TypeCodeOutputStream.wrapOutputStream(os);
            this.write_value(wrapperOutStream);
            if (cachingEnabled) {
                // Cache the buffer for repeated writes
                outBuffer = wrapperOutStream.getTypeCodeBuffer();
                //if (outBuffer != null)
                    //System.out.println("Caching outBuffer with length = " +
                    //outBuffer.length + " for id = " + _id);
            }
        } else {
            //System.out.println("Using cached outBuffer: length = " + outBuffer.length +
                               //", id = " + _id);
        }
        // Write the first 4 bytes first to trigger alignment.
        // We know that it is the kind.
        if (cachingEnabled && outBuffer != null) {
            os.write_long(_kind);
            os.write_octet_array(outBuffer, 0, outBuffer.length);
        } else {
            //System.out.println("Buffer is empty for " + _id);
            wrapperOutStream.writeRawBuffer(os, _kind);
        }
    }
}
 
Example 5
Source File: TypeCodeImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void write_value(OutputStream os) {
    // Wrap OutputStream into TypeCodeOutputStream.
    // This test shouldn't be necessary according to the Java language spec.
    if (os instanceof TypeCodeOutputStream) {
        this.write_value((TypeCodeOutputStream)os);
    } else {
        TypeCodeOutputStream wrapperOutStream = null;

        if (outBuffer == null) {
            wrapperOutStream = TypeCodeOutputStream.wrapOutputStream(os);
            this.write_value(wrapperOutStream);
            if (cachingEnabled) {
                // Cache the buffer for repeated writes
                outBuffer = wrapperOutStream.getTypeCodeBuffer();
                //if (outBuffer != null)
                    //System.out.println("Caching outBuffer with length = " +
                    //outBuffer.length + " for id = " + _id);
            }
        } else {
            //System.out.println("Using cached outBuffer: length = " + outBuffer.length +
                               //", id = " + _id);
        }
        // Write the first 4 bytes first to trigger alignment.
        // We know that it is the kind.
        if (cachingEnabled && outBuffer != null) {
            os.write_long(_kind);
            os.write_octet_array(outBuffer, 0, outBuffer.length);
        } else {
            //System.out.println("Buffer is empty for " + _id);
            wrapperOutStream.writeRawBuffer(os, _kind);
        }
    }
}
 
Example 6
Source File: TypeCodeImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void write_value(OutputStream os) {
    // Wrap OutputStream into TypeCodeOutputStream.
    // This test shouldn't be necessary according to the Java language spec.
    if (os instanceof TypeCodeOutputStream) {
        this.write_value((TypeCodeOutputStream)os);
    } else {
        TypeCodeOutputStream wrapperOutStream = null;

        if (outBuffer == null) {
            wrapperOutStream = TypeCodeOutputStream.wrapOutputStream(os);
            this.write_value(wrapperOutStream);
            if (cachingEnabled) {
                // Cache the buffer for repeated writes
                outBuffer = wrapperOutStream.getTypeCodeBuffer();
                //if (outBuffer != null)
                    //System.out.println("Caching outBuffer with length = " +
                    //outBuffer.length + " for id = " + _id);
            }
        } else {
            //System.out.println("Using cached outBuffer: length = " + outBuffer.length +
                               //", id = " + _id);
        }
        // Write the first 4 bytes first to trigger alignment.
        // We know that it is the kind.
        if (cachingEnabled && outBuffer != null) {
            os.write_long(_kind);
            os.write_octet_array(outBuffer, 0, outBuffer.length);
        } else {
            //System.out.println("Buffer is empty for " + _id);
            wrapperOutStream.writeRawBuffer(os, _kind);
        }
    }
}
 
Example 7
Source File: TypeCodeImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void write_value(OutputStream os) {
    // Wrap OutputStream into TypeCodeOutputStream.
    // This test shouldn't be necessary according to the Java language spec.
    if (os instanceof TypeCodeOutputStream) {
        this.write_value((TypeCodeOutputStream)os);
    } else {
        TypeCodeOutputStream wrapperOutStream = null;

        if (outBuffer == null) {
            wrapperOutStream = TypeCodeOutputStream.wrapOutputStream(os);
            this.write_value(wrapperOutStream);
            if (cachingEnabled) {
                // Cache the buffer for repeated writes
                outBuffer = wrapperOutStream.getTypeCodeBuffer();
                //if (outBuffer != null)
                    //System.out.println("Caching outBuffer with length = " +
                    //outBuffer.length + " for id = " + _id);
            }
        } else {
            //System.out.println("Using cached outBuffer: length = " + outBuffer.length +
                               //", id = " + _id);
        }
        // Write the first 4 bytes first to trigger alignment.
        // We know that it is the kind.
        if (cachingEnabled && outBuffer != null) {
            os.write_long(_kind);
            os.write_octet_array(outBuffer, 0, outBuffer.length);
        } else {
            //System.out.println("Buffer is empty for " + _id);
            wrapperOutStream.writeRawBuffer(os, _kind);
        }
    }
}
 
Example 8
Source File: TypeCodeImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void write_value(OutputStream os) {
    // Wrap OutputStream into TypeCodeOutputStream.
    // This test shouldn't be necessary according to the Java language spec.
    if (os instanceof TypeCodeOutputStream) {
        this.write_value((TypeCodeOutputStream)os);
    } else {
        TypeCodeOutputStream wrapperOutStream = null;

        if (outBuffer == null) {
            wrapperOutStream = TypeCodeOutputStream.wrapOutputStream(os);
            this.write_value(wrapperOutStream);
            if (cachingEnabled) {
                // Cache the buffer for repeated writes
                outBuffer = wrapperOutStream.getTypeCodeBuffer();
                //if (outBuffer != null)
                    //System.out.println("Caching outBuffer with length = " +
                    //outBuffer.length + " for id = " + _id);
            }
        } else {
            //System.out.println("Using cached outBuffer: length = " + outBuffer.length +
                               //", id = " + _id);
        }
        // Write the first 4 bytes first to trigger alignment.
        // We know that it is the kind.
        if (cachingEnabled && outBuffer != null) {
            os.write_long(_kind);
            os.write_octet_array(outBuffer, 0, outBuffer.length);
        } else {
            //System.out.println("Buffer is empty for " + _id);
            wrapperOutStream.writeRawBuffer(os, _kind);
        }
    }
}
 
Example 9
Source File: TypeCodeImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void write_value(OutputStream os) {
    // Wrap OutputStream into TypeCodeOutputStream.
    // This test shouldn't be necessary according to the Java language spec.
    if (os instanceof TypeCodeOutputStream) {
        this.write_value((TypeCodeOutputStream)os);
    } else {
        TypeCodeOutputStream wrapperOutStream = null;

        if (outBuffer == null) {
            wrapperOutStream = TypeCodeOutputStream.wrapOutputStream(os);
            this.write_value(wrapperOutStream);
            if (cachingEnabled) {
                // Cache the buffer for repeated writes
                outBuffer = wrapperOutStream.getTypeCodeBuffer();
                //if (outBuffer != null)
                    //System.out.println("Caching outBuffer with length = " +
                    //outBuffer.length + " for id = " + _id);
            }
        } else {
            //System.out.println("Using cached outBuffer: length = " + outBuffer.length +
                               //", id = " + _id);
        }
        // Write the first 4 bytes first to trigger alignment.
        // We know that it is the kind.
        if (cachingEnabled && outBuffer != null) {
            os.write_long(_kind);
            os.write_octet_array(outBuffer, 0, outBuffer.length);
        } else {
            //System.out.println("Buffer is empty for " + _id);
            wrapperOutStream.writeRawBuffer(os, _kind);
        }
    }
}
 
Example 10
Source File: TypeCodeImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void write_value(OutputStream os) {
    // Wrap OutputStream into TypeCodeOutputStream.
    // This test shouldn't be necessary according to the Java language spec.
    if (os instanceof TypeCodeOutputStream) {
        this.write_value((TypeCodeOutputStream)os);
    } else {
        TypeCodeOutputStream wrapperOutStream = null;

        if (outBuffer == null) {
            wrapperOutStream = TypeCodeOutputStream.wrapOutputStream(os);
            this.write_value(wrapperOutStream);
            if (cachingEnabled) {
                // Cache the buffer for repeated writes
                outBuffer = wrapperOutStream.getTypeCodeBuffer();
                //if (outBuffer != null)
                    //System.out.println("Caching outBuffer with length = " +
                    //outBuffer.length + " for id = " + _id);
            }
        } else {
            //System.out.println("Using cached outBuffer: length = " + outBuffer.length +
                               //", id = " + _id);
        }
        // Write the first 4 bytes first to trigger alignment.
        // We know that it is the kind.
        if (cachingEnabled && outBuffer != null) {
            os.write_long(_kind);
            os.write_octet_array(outBuffer, 0, outBuffer.length);
        } else {
            //System.out.println("Buffer is empty for " + _id);
            wrapperOutStream.writeRawBuffer(os, _kind);
        }
    }
}