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

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

本文整理了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

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

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

  1. public UnknownServiceContext(int id, InputStream is)
  2. {
  3. this.id = id;
  4. int len = is.read_long();
  5. data = new byte[len];
  6. is.read_octet_array(data, 0, len);
  7. }

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

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

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

  1. protected byte[] readObjectKey(InputStream is)
  2. {
  3. int len = is.read_long();
  4. byte[] result = new byte[len];
  5. is.read_octet_array(result, 0, len);
  6. return result;
  7. }

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

  1. public UnknownServiceContext(int id, InputStream is)
  2. {
  3. this.id = id;
  4. int len = is.read_long();
  5. data = new byte[len];
  6. is.read_octet_array(data, 0, len);
  7. }

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

  1. protected byte[] readObjectKey( InputStream is )
  2. {
  3. int len = is.read_long() ;
  4. byte[] result = new byte[len] ;
  5. is.read_octet_array( result, 0, len ) ;
  6. return result ;
  7. }

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

  1. protected byte[] readObjectKey(InputStream is)
  2. {
  3. int len = is.read_long();
  4. byte[] result = new byte[len];
  5. is.read_octet_array(result, 0, len);
  6. return result;
  7. }

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

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

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

  1. public UnknownServiceContext( int id, InputStream is )
  2. {
  3. this.id = id ;
  4. int len = is.read_long();
  5. data = new byte[len];
  6. is.read_octet_array(data,0,len);
  7. }

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

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

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

  1. public final void readFully(byte data[], int offset, int size) throws IOException{
  2. // d11623 : implement readFully, required for serializing some core classes
  3. try{
  4. readObjectState.readData(this);
  5. orbStream.read_octet_array(data, offset, size);
  6. } catch (MARSHAL marshalException) {
  7. handleOptionalDataMarshalException(marshalException, false);
  8. throw marshalException;
  9. } catch(Error e) {
  10. IOException exc = new IOException(e.getMessage());
  11. exc.initCause(e);
  12. throw exc ;
  13. }
  14. }

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

  1. public final int skipBytes(int len) throws IOException{
  2. try{
  3. readObjectState.readData(this);
  4. byte buf[] = new byte[len];
  5. orbStream.read_octet_array(buf, 0, len);
  6. return len;
  7. } catch (MARSHAL marshalException) {
  8. handleOptionalDataMarshalException(marshalException, false);
  9. throw marshalException;
  10. } catch(Error e) {
  11. IOException exc = new IOException(e.getMessage());
  12. exc.initCause(e) ;
  13. throw exc ;
  14. }
  15. }

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

  1. public final int skipBytes(int len) throws IOException
  2. {
  3. try
  4. {
  5. readObjectState.readData(this);
  6. byte buf[] = new byte[len];
  7. orbStream.read_octet_array(buf, 0, len);
  8. return len;
  9. }
  10. catch (MARSHAL marshalException)
  11. {
  12. handleOptionalDataMarshalException(marshalException, false);
  13. throw marshalException;
  14. }
  15. catch (Error e)
  16. {
  17. IOException exc = new IOException(e.getMessage());
  18. exc.initCause(e);
  19. throw exc;
  20. }
  21. }

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

  1. public final int read(byte data[], int offset, int length) throws IOException{
  2. try{
  3. readObjectState.readData(this);
  4. orbStream.read_octet_array(data, offset, length);
  5. return length;
  6. } catch (MARSHAL marshalException) {
  7. if (marshalException.minor
  8. == OMGSystemException.RMIIIOP_OPTIONAL_DATA_INCOMPATIBLE1) {
  9. setState(IN_READ_OBJECT_NO_MORE_OPT_DATA);
  10. return -1;
  11. }
  12. throw marshalException;
  13. } catch(Error e) {
  14. IOException exc = new IOException(e.getMessage());
  15. exc.initCause(e) ;
  16. throw exc ;
  17. }
  18. }

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

  1. public final int skipBytes(int len) throws IOException
  2. {
  3. try
  4. {
  5. readObjectState.readData(this);
  6. byte buf[] = new byte[len];
  7. orbStream.read_octet_array(buf, 0, len);
  8. return len;
  9. }
  10. catch (MARSHAL marshalException)
  11. {
  12. handleOptionalDataMarshalException(marshalException, false);
  13. throw marshalException;
  14. }
  15. catch (Error e)
  16. {
  17. IOException exc = new IOException(e.getMessage());
  18. exc.initCause(e);
  19. throw exc;
  20. }
  21. }

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

  1. public final int read(byte data[], int offset, int length) throws IOException
  2. {
  3. try
  4. {
  5. readObjectState.readData(this);
  6. orbStream.read_octet_array(data, offset, length);
  7. return length;
  8. }
  9. catch (MARSHAL marshalException)
  10. {
  11. if (marshalException.minor == OMGSystemException.RMIIIOP_OPTIONAL_DATA_INCOMPATIBLE1)
  12. {
  13. setState(IN_READ_OBJECT_NO_MORE_OPT_DATA);
  14. return -1;
  15. }
  16. throw marshalException;
  17. }
  18. catch (Error e)
  19. {
  20. IOException exc = new IOException(e.getMessage());
  21. exc.initCause(e);
  22. throw exc;
  23. }
  24. }

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

  1. public final void readFully(byte data[], int offset, int size) throws IOException
  2. {
  3. // d11623 : implement readFully, required for serializing some core classes
  4. try
  5. {
  6. readObjectState.readData(this);
  7. orbStream.read_octet_array(data, offset, size);
  8. }
  9. catch (MARSHAL marshalException)
  10. {
  11. handleOptionalDataMarshalException(marshalException, false);
  12. throw marshalException;
  13. }
  14. catch (Error e)
  15. {
  16. IOException exc = new IOException(e.getMessage());
  17. exc.initCause(e);
  18. throw exc;
  19. }
  20. }

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

  1. public final void readFully(byte data[], int offset, int size) throws IOException
  2. {
  3. // d11623 : implement readFully, required for serializing some core classes
  4. try
  5. {
  6. readObjectState.readData(this);
  7. orbStream.read_octet_array(data, offset, size);
  8. }
  9. catch (MARSHAL marshalException)
  10. {
  11. handleOptionalDataMarshalException(marshalException, false);
  12. throw marshalException;
  13. }
  14. catch (Error e)
  15. {
  16. IOException exc = new IOException(e.getMessage());
  17. exc.initCause(e);
  18. throw exc;
  19. }
  20. }

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

  1. public static TypeCodeInputStream readEncapsulation(InputStream is, org.omg.CORBA.ORB _orb)
  2. {
  3. // _REVISIT_ Would be nice if we didn't have to copy the buffer!
  4. TypeCodeInputStream encap;
  5. int encapLength = is.read_long();
  6. // read off part of the buffer corresponding to the encapsulation
  7. byte[] encapBuffer = new byte[encapLength];
  8. is.read_octet_array(encapBuffer, 0, encapBuffer.length);
  9. // create an encapsulation using the marshal buffer
  10. if (is instanceof CDRInputStream)
  11. {
  12. encap = new TypeCodeInputStream(_orb, encapBuffer, encapBuffer.length,
  13. ((CDRInputStream) is).isLittleEndian(), ((CDRInputStream) is).getGIOPVersion());
  14. }
  15. else
  16. {
  17. encap = new TypeCodeInputStream(_orb, encapBuffer, encapBuffer.length);
  18. }
  19. encap.setEnclosingInputStream(is);
  20. encap.makeEncapsulation();
  21. return encap;
  22. }

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

  1. public static TypeCodeInputStream readEncapsulation(InputStream is, org.omg.CORBA.ORB _orb)
  2. {
  3. // _REVISIT_ Would be nice if we didn't have to copy the buffer!
  4. TypeCodeInputStream encap;
  5. int encapLength = is.read_long();
  6. // read off part of the buffer corresponding to the encapsulation
  7. byte[] encapBuffer = new byte[encapLength];
  8. is.read_octet_array(encapBuffer, 0, encapBuffer.length);
  9. // create an encapsulation using the marshal buffer
  10. if (is instanceof CDRInputStream)
  11. {
  12. encap = new TypeCodeInputStream(_orb, encapBuffer, encapBuffer.length,
  13. ((CDRInputStream) is).isLittleEndian(), ((CDRInputStream) is).getGIOPVersion());
  14. }
  15. else
  16. {
  17. encap = new TypeCodeInputStream(_orb, encapBuffer, encapBuffer.length);
  18. }
  19. encap.setEnclosingInputStream(is);
  20. encap.makeEncapsulation();
  21. return encap;
  22. }

相关文章