Java Code Examples for org.omg.CORBA.OctetSeqHelper

The following examples show how to use org.omg.CORBA.OctetSeqHelper. These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: jdk1.8-source-analysis   Source File: ServiceContexts.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Given the input stream, this fills our service
 * context map.  See the definition of scMap for
 * details.  Creates a HashMap.
 *
 * Note that we don't actually unmarshal the
 * bytes of the service contexts here.  That is
 * done when they are actually requested via
 * get(int).
 */
private void createMapFromInputStream(InputStream is)
{
    orb = (ORB)(is.orb()) ;
    if (orb.serviceContextDebugFlag)
        dprint( "Constructing ServiceContexts from input stream" ) ;

    int numValid = is.read_long() ;

    if (orb.serviceContextDebugFlag)
        dprint("Number of service contexts = " + numValid);

    for (int ctr = 0; ctr < numValid; ctr++) {
        int scId = is.read_long();

        if (orb.serviceContextDebugFlag)
            dprint("Reading service context id " + scId);

        byte[] data = OctetSeqHelper.read(is);

        if (orb.serviceContextDebugFlag)
            dprint("Service context" + scId + " length: " + data.length);

        scMap.put(new Integer(scId), data);
    }
}
 
Example 2
Source Project: jdk1.8-source-analysis   Source File: ServiceContexts.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example 3
/**
 * Given the input stream, this fills our service
 * context map.  See the definition of scMap for
 * details.  Creates a HashMap.
 *
 * Note that we don't actually unmarshal the
 * bytes of the service contexts here.  That is
 * done when they are actually requested via
 * get(int).
 */
private void createMapFromInputStream(InputStream is)
{
    orb = (ORB)(is.orb()) ;
    if (orb.serviceContextDebugFlag)
        dprint( "Constructing ServiceContexts from input stream" ) ;

    int numValid = is.read_long() ;

    if (orb.serviceContextDebugFlag)
        dprint("Number of service contexts = " + numValid);

    for (int ctr = 0; ctr < numValid; ctr++) {
        int scId = is.read_long();

        if (orb.serviceContextDebugFlag)
            dprint("Reading service context id " + scId);

        byte[] data = OctetSeqHelper.read(is);

        if (orb.serviceContextDebugFlag)
            dprint("Service context" + scId + " length: " + data.length);

        scMap.put(new Integer(scId), data);
    }
}
 
Example 4
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example 5
Source Project: jdk8u60   Source File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Given the input stream, this fills our service
 * context map.  See the definition of scMap for
 * details.  Creates a HashMap.
 *
 * Note that we don't actually unmarshal the
 * bytes of the service contexts here.  That is
 * done when they are actually requested via
 * get(int).
 */
private void createMapFromInputStream(InputStream is)
{
    orb = (ORB)(is.orb()) ;
    if (orb.serviceContextDebugFlag)
        dprint( "Constructing ServiceContexts from input stream" ) ;

    int numValid = is.read_long() ;

    if (orb.serviceContextDebugFlag)
        dprint("Number of service contexts = " + numValid);

    for (int ctr = 0; ctr < numValid; ctr++) {
        int scId = is.read_long();

        if (orb.serviceContextDebugFlag)
            dprint("Reading service context id " + scId);

        byte[] data = OctetSeqHelper.read(is);

        if (orb.serviceContextDebugFlag)
            dprint("Service context" + scId + " length: " + data.length);

        scMap.put(new Integer(scId), data);
    }
}
 
Example 6
Source Project: jdk8u60   Source File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example 7
Source Project: JDKSourceCode1.8   Source File: ServiceContexts.java    License: MIT License 6 votes vote down vote up
/**
 * Given the input stream, this fills our service
 * context map.  See the definition of scMap for
 * details.  Creates a HashMap.
 *
 * Note that we don't actually unmarshal the
 * bytes of the service contexts here.  That is
 * done when they are actually requested via
 * get(int).
 */
private void createMapFromInputStream(InputStream is)
{
    orb = (ORB)(is.orb()) ;
    if (orb.serviceContextDebugFlag)
        dprint( "Constructing ServiceContexts from input stream" ) ;

    int numValid = is.read_long() ;

    if (orb.serviceContextDebugFlag)
        dprint("Number of service contexts = " + numValid);

    for (int ctr = 0; ctr < numValid; ctr++) {
        int scId = is.read_long();

        if (orb.serviceContextDebugFlag)
            dprint("Reading service context id " + scId);

        byte[] data = OctetSeqHelper.read(is);

        if (orb.serviceContextDebugFlag)
            dprint("Service context" + scId + " length: " + data.length);

        scMap.put(new Integer(scId), data);
    }
}
 
Example 8
Source Project: JDKSourceCode1.8   Source File: ServiceContexts.java    License: MIT License 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example 9
/**
 * Given the input stream, this fills our service
 * context map.  See the definition of scMap for
 * details.  Creates a HashMap.
 *
 * Note that we don't actually unmarshal the
 * bytes of the service contexts here.  That is
 * done when they are actually requested via
 * get(int).
 */
private void createMapFromInputStream(InputStream is)
{
    orb = (ORB)(is.orb()) ;
    if (orb.serviceContextDebugFlag)
        dprint( "Constructing ServiceContexts from input stream" ) ;

    int numValid = is.read_long() ;

    if (orb.serviceContextDebugFlag)
        dprint("Number of service contexts = " + numValid);

    for (int ctr = 0; ctr < numValid; ctr++) {
        int scId = is.read_long();

        if (orb.serviceContextDebugFlag)
            dprint("Reading service context id " + scId);

        byte[] data = OctetSeqHelper.read(is);

        if (orb.serviceContextDebugFlag)
            dprint("Service context" + scId + " length: " + data.length);

        scMap.put(new Integer(scId), data);
    }
}
 
Example 10
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example 11
/**
 * Given the input stream, this fills our service
 * context map.  See the definition of scMap for
 * details.  Creates a HashMap.
 *
 * Note that we don't actually unmarshal the
 * bytes of the service contexts here.  That is
 * done when they are actually requested via
 * get(int).
 */
private void createMapFromInputStream(InputStream is)
{
    orb = (ORB)(is.orb()) ;
    if (orb.serviceContextDebugFlag)
        dprint( "Constructing ServiceContexts from input stream" ) ;

    int numValid = is.read_long() ;

    if (orb.serviceContextDebugFlag)
        dprint("Number of service contexts = " + numValid);

    for (int ctr = 0; ctr < numValid; ctr++) {
        int scId = is.read_long();

        if (orb.serviceContextDebugFlag)
            dprint("Reading service context id " + scId);

        byte[] data = OctetSeqHelper.read(is);

        if (orb.serviceContextDebugFlag)
            dprint("Service context" + scId + " length: " + data.length);

        scMap.put(new Integer(scId), data);
    }
}
 
Example 12
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example 13
Source Project: openjdk-jdk9   Source File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Given the input stream, this fills our service
 * context map.  See the definition of scMap for
 * details.  Creates a HashMap.
 *
 * Note that we don't actually unmarshal the
 * bytes of the service contexts here.  That is
 * done when they are actually requested via
 * get(int).
 */
private void createMapFromInputStream(InputStream is)
{
    orb = (ORB)(is.orb()) ;
    if (orb.serviceContextDebugFlag)
        dprint( "Constructing ServiceContexts from input stream" ) ;

    int numValid = is.read_long() ;

    if (orb.serviceContextDebugFlag)
        dprint("Number of service contexts = " + numValid);

    for (int ctr = 0; ctr < numValid; ctr++) {
        int scId = is.read_long();

        if (orb.serviceContextDebugFlag)
            dprint("Reading service context id " + scId);

        byte[] data = OctetSeqHelper.read(is);

        if (orb.serviceContextDebugFlag)
            dprint("Service context" + scId + " length: " + data.length);

        scMap.put(new Integer(scId), data);
    }
}
 
Example 14
Source Project: openjdk-jdk9   Source File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example 15
Source Project: hottub   Source File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Given the input stream, this fills our service
 * context map.  See the definition of scMap for
 * details.  Creates a HashMap.
 *
 * Note that we don't actually unmarshal the
 * bytes of the service contexts here.  That is
 * done when they are actually requested via
 * get(int).
 */
private void createMapFromInputStream(InputStream is)
{
    orb = (ORB)(is.orb()) ;
    if (orb.serviceContextDebugFlag)
        dprint( "Constructing ServiceContexts from input stream" ) ;

    int numValid = is.read_long() ;

    if (orb.serviceContextDebugFlag)
        dprint("Number of service contexts = " + numValid);

    for (int ctr = 0; ctr < numValid; ctr++) {
        int scId = is.read_long();

        if (orb.serviceContextDebugFlag)
            dprint("Reading service context id " + scId);

        byte[] data = OctetSeqHelper.read(is);

        if (orb.serviceContextDebugFlag)
            dprint("Service context" + scId + " length: " + data.length);

        scMap.put(new Integer(scId), data);
    }
}
 
Example 16
Source Project: hottub   Source File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example 17
/**
 * Given the input stream, this fills our service
 * context map.  See the definition of scMap for
 * details.  Creates a HashMap.
 *
 * Note that we don't actually unmarshal the
 * bytes of the service contexts here.  That is
 * done when they are actually requested via
 * get(int).
 */
private void createMapFromInputStream(InputStream is)
{
    orb = (ORB)(is.orb()) ;
    if (orb.serviceContextDebugFlag)
        dprint( "Constructing ServiceContexts from input stream" ) ;

    int numValid = is.read_long() ;

    if (orb.serviceContextDebugFlag)
        dprint("Number of service contexts = " + numValid);

    for (int ctr = 0; ctr < numValid; ctr++) {
        int scId = is.read_long();

        if (orb.serviceContextDebugFlag)
            dprint("Reading service context id " + scId);

        byte[] data = OctetSeqHelper.read(is);

        if (orb.serviceContextDebugFlag)
            dprint("Service context" + scId + " length: " + data.length);

        scMap.put(new Integer(scId), data);
    }
}
 
Example 18
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example 19
Source Project: openjdk-8   Source File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Given the input stream, this fills our service
 * context map.  See the definition of scMap for
 * details.  Creates a HashMap.
 *
 * Note that we don't actually unmarshal the
 * bytes of the service contexts here.  That is
 * done when they are actually requested via
 * get(int).
 */
private void createMapFromInputStream(InputStream is)
{
    orb = (ORB)(is.orb()) ;
    if (orb.serviceContextDebugFlag)
        dprint( "Constructing ServiceContexts from input stream" ) ;

    int numValid = is.read_long() ;

    if (orb.serviceContextDebugFlag)
        dprint("Number of service contexts = " + numValid);

    for (int ctr = 0; ctr < numValid; ctr++) {
        int scId = is.read_long();

        if (orb.serviceContextDebugFlag)
            dprint("Reading service context id " + scId);

        byte[] data = OctetSeqHelper.read(is);

        if (orb.serviceContextDebugFlag)
            dprint("Service context" + scId + " length: " + data.length);

        scMap.put(new Integer(scId), data);
    }
}
 
Example 20
Source Project: openjdk-8   Source File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}