org.omg.CORBA_2_3.portable.InputStream.read_octet_array()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中org.omg.CORBA_2_3.portable.InputStream.read_octet_array()方法的一些代码示例,展示了InputStream.read_octet_array()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。InputStream.read_octet_array()方法的具体详情如下:
包路径:org.omg.CORBA_2_3.portable.InputStream
类名称:InputStream
方法名:read_octet_array

InputStream.read_octet_array介绍

暂无

代码示例

代码示例来源:origin: org.apache.yoko/yoko-rmi-impl

public void readFully(byte[] arr, int off, int val)
    throws java.io.IOException {
  in.read_octet_array(arr, off, val);
}

代码示例来源:origin: jboss/jboss-javaee-specs

public UnknownServiceContext(int id, InputStream is)
{
  this.id = id;
  int len = is.read_long();
  data = new byte[len];
  is.read_octet_array(data, 0, len);
}

代码示例来源:origin: org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec

/**
 * Helper method that reads an octet array from an input stream. Defined as static here so that it can be used in
 * another class.
 */
static public byte[] readOctets(InputStream is)
{
  int len = is.read_ulong();
  byte[] data = new byte[len];
  is.read_octet_array(data, 0, len);
  return data;
}

代码示例来源:origin: org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec

protected byte[] readObjectKey(InputStream is)
{
  int len = is.read_long();
  byte[] result = new byte[len];
  is.read_octet_array(result, 0, len);
  return result;
}

代码示例来源:origin: org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec

public UnknownServiceContext(int id, InputStream is)
{
  this.id = id;
  int len = is.read_long();
  data = new byte[len];
  is.read_octet_array(data, 0, len);
}

代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb

protected byte[] readObjectKey( InputStream is )
{
  int len = is.read_long() ;
  byte[] result = new byte[len] ;
  is.read_octet_array( result, 0, len ) ;
  return result ;
}

代码示例来源:origin: jboss/jboss-javaee-specs

protected byte[] readObjectKey(InputStream is)
{
  int len = is.read_long();
  byte[] result = new byte[len];
  is.read_octet_array(result, 0, len);
  return result;
}

代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb

/** Helper method that reads an octet array from an input stream.
* Defined as static here so that it can be used in another class.
*/
static public byte[] readOctets( InputStream is )
{
  int len = is.read_ulong() ;
  byte[] data = new byte[len] ;
  is.read_octet_array( data, 0, len ) ;
  return data ;
}

代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb

public UnknownServiceContext( int id, InputStream is )
{
  this.id = id ;
  int len = is.read_long();
  data = new byte[len];
  is.read_octet_array(data,0,len);
}

代码示例来源:origin: jboss/jboss-javaee-specs

/**
 * Helper method that reads an octet array from an input stream. Defined as static here so that it can be used in
 * another class.
 */
static public byte[] readOctets(InputStream is)
{
  int len = is.read_ulong();
  byte[] data = new byte[len];
  is.read_octet_array(data, 0, len);
  return data;
}

代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb-jdk9-supplement

public final void readFully(byte data[],  int offset,  int size) throws IOException{
// d11623 : implement readFully, required for serializing some core classes
    try{
      readObjectState.readData(this);

      orbStream.read_octet_array(data, offset, size);
    } catch (MARSHAL marshalException) {
      handleOptionalDataMarshalException(marshalException, false);

      throw marshalException;
    } catch(Error e) {
      IOException exc = new IOException(e.getMessage());
      exc.initCause(e);
      throw exc ;
    }
  }

代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb-jdk9-supplement

public final int skipBytes(int len) throws IOException{
  try{
    readObjectState.readData(this);
    byte buf[] = new byte[len];
    orbStream.read_octet_array(buf, 0, len);
    return len;
  } catch (MARSHAL marshalException) {
    handleOptionalDataMarshalException(marshalException, false);
    throw marshalException;
  } catch(Error e) {
    IOException exc = new IOException(e.getMessage());
    exc.initCause(e) ;
    throw exc ;
  }
}

代码示例来源:origin: jboss/jboss-javaee-specs

public final int skipBytes(int len) throws IOException
{
  try
  {
    readObjectState.readData(this);
    byte buf[] = new byte[len];
    orbStream.read_octet_array(buf, 0, len);
    return len;
  }
  catch (MARSHAL marshalException)
  {
    handleOptionalDataMarshalException(marshalException, false);
    throw marshalException;
  }
  catch (Error e)
  {
    IOException exc = new IOException(e.getMessage());
    exc.initCause(e);
    throw exc;
  }
}

代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb-jdk9-supplement

public final int read(byte data[], int offset, int length) throws IOException{
  try{
    readObjectState.readData(this);
    orbStream.read_octet_array(data, offset, length);
    return length;
  } catch (MARSHAL marshalException) {
    if (marshalException.minor
      == OMGSystemException.RMIIIOP_OPTIONAL_DATA_INCOMPATIBLE1) {
      setState(IN_READ_OBJECT_NO_MORE_OPT_DATA);
      return -1;
    }
    throw marshalException;
  } catch(Error e) {
    IOException exc = new IOException(e.getMessage());
    exc.initCause(e) ;
    throw exc ;
  }
}

代码示例来源:origin: org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec

public final int skipBytes(int len) throws IOException
{
  try
  {
    readObjectState.readData(this);
    byte buf[] = new byte[len];
    orbStream.read_octet_array(buf, 0, len);
    return len;
  }
  catch (MARSHAL marshalException)
  {
    handleOptionalDataMarshalException(marshalException, false);
    throw marshalException;
  }
  catch (Error e)
  {
    IOException exc = new IOException(e.getMessage());
    exc.initCause(e);
    throw exc;
  }
}

代码示例来源:origin: org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec

public final int read(byte data[], int offset, int length) throws IOException
{
  try
  {
    readObjectState.readData(this);
    orbStream.read_octet_array(data, offset, length);
    return length;
  }
  catch (MARSHAL marshalException)
  {
    if (marshalException.minor == OMGSystemException.RMIIIOP_OPTIONAL_DATA_INCOMPATIBLE1)
    {
      setState(IN_READ_OBJECT_NO_MORE_OPT_DATA);
      return -1;
    }
    throw marshalException;
  }
  catch (Error e)
  {
    IOException exc = new IOException(e.getMessage());
    exc.initCause(e);
    throw exc;
  }
}

代码示例来源:origin: org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec

public final void readFully(byte data[], int offset, int size) throws IOException
{
  // d11623 : implement readFully, required for serializing some core classes
  try
  {
    readObjectState.readData(this);
    orbStream.read_octet_array(data, offset, size);
  }
  catch (MARSHAL marshalException)
  {
    handleOptionalDataMarshalException(marshalException, false);
    throw marshalException;
  }
  catch (Error e)
  {
    IOException exc = new IOException(e.getMessage());
    exc.initCause(e);
    throw exc;
  }
}

代码示例来源:origin: jboss/jboss-javaee-specs

public final void readFully(byte data[], int offset, int size) throws IOException
{
  // d11623 : implement readFully, required for serializing some core classes
  try
  {
    readObjectState.readData(this);
    orbStream.read_octet_array(data, offset, size);
  }
  catch (MARSHAL marshalException)
  {
    handleOptionalDataMarshalException(marshalException, false);
    throw marshalException;
  }
  catch (Error e)
  {
    IOException exc = new IOException(e.getMessage());
    exc.initCause(e);
    throw exc;
  }
}

代码示例来源:origin: org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec

public static TypeCodeInputStream readEncapsulation(InputStream is, org.omg.CORBA.ORB _orb)
{
  // _REVISIT_ Would be nice if we didn't have to copy the buffer!
  TypeCodeInputStream encap;
  int encapLength = is.read_long();
  // read off part of the buffer corresponding to the encapsulation
  byte[] encapBuffer = new byte[encapLength];
  is.read_octet_array(encapBuffer, 0, encapBuffer.length);
  // create an encapsulation using the marshal buffer
  if (is instanceof CDRInputStream)
  {
    encap = new TypeCodeInputStream(_orb, encapBuffer, encapBuffer.length,
        ((CDRInputStream) is).isLittleEndian(), ((CDRInputStream) is).getGIOPVersion());
  }
  else
  {
    encap = new TypeCodeInputStream(_orb, encapBuffer, encapBuffer.length);
  }
  encap.setEnclosingInputStream(is);
  encap.makeEncapsulation();
  return encap;
}

代码示例来源:origin: jboss/jboss-javaee-specs

public static TypeCodeInputStream readEncapsulation(InputStream is, org.omg.CORBA.ORB _orb)
{
  // _REVISIT_ Would be nice if we didn't have to copy the buffer!
  TypeCodeInputStream encap;
  int encapLength = is.read_long();
  // read off part of the buffer corresponding to the encapsulation
  byte[] encapBuffer = new byte[encapLength];
  is.read_octet_array(encapBuffer, 0, encapBuffer.length);
  // create an encapsulation using the marshal buffer
  if (is instanceof CDRInputStream)
  {
    encap = new TypeCodeInputStream(_orb, encapBuffer, encapBuffer.length,
        ((CDRInputStream) is).isLittleEndian(), ((CDRInputStream) is).getGIOPVersion());
  }
  else
  {
    encap = new TypeCodeInputStream(_orb, encapBuffer, encapBuffer.length);
  }
  encap.setEnclosingInputStream(is);
  encap.makeEncapsulation();
  return encap;
}

相关文章