Java 类org.omg.CORBA.CharSeqHelper 实例源码

项目:javify    文件:ArrayValueHelper.java   
/**
 * Write the array to the input stream.
 */
public void write_value(OutputStream output, Serializable value)
{
  if (output instanceof gnuValueStream)
    {
      gnuRuntime r = ((gnuValueStream) output).getRunTime();
      if (r != null)
        r.target = null;
    }

  if (value instanceof byte[])
    OctetSeqHelper.write(output, (byte[]) value);
  else if (value instanceof String[])
    {
      String[] s = (String[]) value;
      output.write_long(s.length);
      for (int i = 0; i < s.length; i++)
        Vio.write(output, s[i], Vio.m_StringValueHelper);
    }
  else if (value instanceof int[])
    LongSeqHelper.write(output, (int[]) value);
  else if (value instanceof long[])
    LongLongSeqHelper.write(output, (long[]) value);
  else if (value instanceof double[])
    DoubleSeqHelper.write(output, (double[]) value);
  else if (value instanceof float[])
    FloatSeqHelper.write(output, (float[]) value);
  else if (value instanceof boolean[])
    BooleanSeqHelper.write(output, (boolean[]) value);
  else if (value instanceof short[])
    ShortSeqHelper.write(output, (short[]) value);
  else if (value instanceof char[])
    CharSeqHelper.write(output, (char[]) value);
  else
    {
      // Write others, use reflection.
      component = arrayClass.getComponentType();

      int n = Array.getLength(value);
      output.write_long(n);
      if (written_as_object())
        for (int i = 0; i < n; i++)
          {
            Object o = Array.get(value, i);
            if (o == null)
              output.write_Object(null);
            else
              // CORBA objects have another notation.
              handler.writeValue(output, (Serializable) o);
          }
      else
        {
          for (int i = 0; i < n; i++)
            Vio.write(output, (Serializable) Array.get(value, i),
              component);
        }

    }
}
项目:jvm-stm    文件:ArrayValueHelper.java   
/**
 * Write the array to the input stream.
 */
public void write_value(OutputStream output, Serializable value)
{
  if (output instanceof gnuValueStream)
    {
      gnuRuntime r = ((gnuValueStream) output).getRunTime();
      if (r != null)
        r.target = null;
    }

  if (value instanceof byte[])
    OctetSeqHelper.write(output, (byte[]) value);
  else if (value instanceof String[])
    {
      String[] s = (String[]) value;
      output.write_long(s.length);
      for (int i = 0; i < s.length; i++)
        Vio.write(output, s[i], Vio.m_StringValueHelper);
    }
  else if (value instanceof int[])
    LongSeqHelper.write(output, (int[]) value);
  else if (value instanceof long[])
    LongLongSeqHelper.write(output, (long[]) value);
  else if (value instanceof double[])
    DoubleSeqHelper.write(output, (double[]) value);
  else if (value instanceof float[])
    FloatSeqHelper.write(output, (float[]) value);
  else if (value instanceof boolean[])
    BooleanSeqHelper.write(output, (boolean[]) value);
  else if (value instanceof short[])
    ShortSeqHelper.write(output, (short[]) value);
  else if (value instanceof char[])
    CharSeqHelper.write(output, (char[]) value);
  else
    {
      // Write others, use reflection.
      component = arrayClass.getComponentType();

      int n = Array.getLength(value);
      output.write_long(n);
      if (written_as_object())
        for (int i = 0; i < n; i++)
          {
            Object o = Array.get(value, i);
            if (o == null)
              output.write_Object(null);
            else
              // CORBA objects have another notation.
              handler.writeValue(output, (Serializable) o);
          }
      else
        {
          for (int i = 0; i < n; i++)
            Vio.write(output, (Serializable) Array.get(value, i),
              component);
        }

    }
}
项目:JamVM-PH    文件:ArrayValueHelper.java   
/**
 * Write the array to the input stream.
 */
public void write_value(OutputStream output, Serializable value)
{
  if (output instanceof gnuValueStream)
    {
      gnuRuntime r = ((gnuValueStream) output).getRunTime();
      if (r != null)
        r.target = null;
    }

  if (value instanceof byte[])
    OctetSeqHelper.write(output, (byte[]) value);
  else if (value instanceof String[])
    {
      String[] s = (String[]) value;
      output.write_long(s.length);
      for (int i = 0; i < s.length; i++)
        Vio.write(output, s[i], Vio.m_StringValueHelper);
    }
  else if (value instanceof int[])
    LongSeqHelper.write(output, (int[]) value);
  else if (value instanceof long[])
    LongLongSeqHelper.write(output, (long[]) value);
  else if (value instanceof double[])
    DoubleSeqHelper.write(output, (double[]) value);
  else if (value instanceof float[])
    FloatSeqHelper.write(output, (float[]) value);
  else if (value instanceof boolean[])
    BooleanSeqHelper.write(output, (boolean[]) value);
  else if (value instanceof short[])
    ShortSeqHelper.write(output, (short[]) value);
  else if (value instanceof char[])
    CharSeqHelper.write(output, (char[]) value);
  else
    {
      // Write others, use reflection.
      component = arrayClass.getComponentType();

      int n = Array.getLength(value);
      output.write_long(n);
      if (written_as_object())
        for (int i = 0; i < n; i++)
          {
            Object o = Array.get(value, i);
            if (o == null)
              output.write_Object(null);
            else
              // CORBA objects have another notation.
              handler.writeValue(output, (Serializable) o);
          }
      else
        {
          for (int i = 0; i < n; i++)
            Vio.write(output, (Serializable) Array.get(value, i),
              component);
        }

    }
}
项目:classpath    文件:ArrayValueHelper.java   
/**
 * Write the array to the input stream.
 */
public void write_value(OutputStream output, Serializable value)
{
  if (output instanceof gnuValueStream)
    {
      gnuRuntime r = ((gnuValueStream) output).getRunTime();
      if (r != null)
        r.target = null;
    }

  if (value instanceof byte[])
    OctetSeqHelper.write(output, (byte[]) value);
  else if (value instanceof String[])
    {
      String[] s = (String[]) value;
      output.write_long(s.length);
      for (int i = 0; i < s.length; i++)
        Vio.write(output, s[i], Vio.m_StringValueHelper);
    }
  else if (value instanceof int[])
    LongSeqHelper.write(output, (int[]) value);
  else if (value instanceof long[])
    LongLongSeqHelper.write(output, (long[]) value);
  else if (value instanceof double[])
    DoubleSeqHelper.write(output, (double[]) value);
  else if (value instanceof float[])
    FloatSeqHelper.write(output, (float[]) value);
  else if (value instanceof boolean[])
    BooleanSeqHelper.write(output, (boolean[]) value);
  else if (value instanceof short[])
    ShortSeqHelper.write(output, (short[]) value);
  else if (value instanceof char[])
    CharSeqHelper.write(output, (char[]) value);
  else
    {
      // Write others, use reflection.
      component = arrayClass.getComponentType();

      int n = Array.getLength(value);
      output.write_long(n);
      if (written_as_object())
        for (int i = 0; i < n; i++)
          {
            Object o = Array.get(value, i);
            if (o == null)
              output.write_Object(null);
            else
              // CORBA objects have another notation.
              handler.writeValue(output, (Serializable) o);
          }
      else
        {
          for (int i = 0; i < n; i++)
            Vio.write(output, (Serializable) Array.get(value, i),
              component);
        }

    }
}