com.sun.corba.se.impl.encoding.TypeCodeOutputStream Java Examples

The following examples show how to use com.sun.corba.se.impl.encoding.TypeCodeOutputStream. 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 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 #2
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 #3
Source File: OutputStreamFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb);
            }
    });
}
 
Example #4
Source File: OutputStreamFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb, final boolean littleEndian) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb, littleEndian);
            }
    });
}
 
Example #5
Source File: TypeCodeImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example #6
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 #7
Source File: OutputStreamFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb);
            }
    });
}
 
Example #8
Source File: OutputStreamFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb, final boolean littleEndian) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb, littleEndian);
            }
    });
}
 
Example #9
Source File: TypeCodeImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example #10
Source File: TypeCodeImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example #11
Source File: OutputStreamFactory.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb);
            }
    });
}
 
Example #12
Source File: OutputStreamFactory.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb, final boolean littleEndian) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb, littleEndian);
            }
    });
}
 
Example #13
Source File: TypeCodeImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example #14
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 #15
Source File: OutputStreamFactory.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb);
            }
    });
}
 
Example #16
Source File: OutputStreamFactory.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb, final boolean littleEndian) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb, littleEndian);
            }
    });
}
 
Example #17
Source File: TypeCodeImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example #18
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);
        }
    }
}
 
Example #19
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 #20
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 #21
Source File: OutputStreamFactory.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb);
            }
    });
}
 
Example #22
Source File: OutputStreamFactory.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb, final boolean littleEndian) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb, littleEndian);
            }
    });
}
 
Example #23
Source File: TypeCodeImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example #24
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 #25
Source File: OutputStreamFactory.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb);
            }
    });
}
 
Example #26
Source File: OutputStreamFactory.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeOutputStream newTypeCodeOutputStream(
        final ORB orb, final boolean littleEndian) {
    return AccessController.doPrivileged(
        new PrivilegedAction<TypeCodeOutputStream>() {
            @Override
            public TypeCodeOutputStream run() {
                return new TypeCodeOutputStream(orb, littleEndian);
            }
    });
}
 
Example #27
Source File: TypeCodeImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example #28
Source File: TypeCodeImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example #29
Source File: TypeCodeImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example #30
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);
        }
    }
}