File: CodecOperations.java

package info (click to toggle)
openjdk-6 6b18-1.8.13-0%2Bsqueeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 102,240 kB
  • ctags: 43,828
  • sloc: java: 213,397; cpp: 30,201; ansic: 6,269; asm: 5,754; sh: 4,365; makefile: 3,549; python: 310
file content (77 lines) | stat: -rw-r--r-- 3,440 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package org.omg.IOP;


/**
* org/omg/IOP/CodecOperations.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/org/omg/PortableInterceptor/IOP.idl
* Friday, May 25, 2007 3:39:55 o'clock PM GMT-05:00
*/


/**
   * The formats of IOR components and service context data used by ORB 
   * services are often defined as CDR encapsulations encoding instances 
   * of IDL defined data types. The <code>Codec</code> provides a mechanism 
   * to transfer these components between their IDL data types and their CDR 
   * encapsulation representations. 
   * <p>
   * A <code>Codec</code> is obtained from the <code>CodecFactory</code>. 
   * The <code>CodecFactory</code> is obtained through a call to 
   * <code>ORB.resolve_initial_references( "CodecFactory" )</code>.
   */
public interface CodecOperations 
{

  /**
       * Converts the given any into a byte array based on the encoding 
       * format effective for this <code>Codec</code>. 
       *
       * @param data The data, in the form of an any, to be encoded into 
       *     a byte array.
       * @return A byte array containing the encoded Any. This byte array 
       *     contains both the <code>TypeCode</code> and the data of the type.
       * @exception InvalidTypeForEncoding thrown if the type is not valid for 
       *     the encoding format effective for this <code>Codec</code>.
       */
  byte[] encode (org.omg.CORBA.Any data) throws org.omg.IOP.CodecPackage.InvalidTypeForEncoding;

  /**
       * Decodes the given byte array into an Any based on the encoding 
       * format effective for this <code>Codec</code>. 
       * 
       * @param data The data, in the form of a byte array, to be decoded into 
       *     an Any. 
       * @return An Any containing the data from the decoded byte array.
       * @exception FormatMismatch is thrown if the byte array cannot be 
       *     decoded into an Any. 
       */
  org.omg.CORBA.Any decode (byte[] data) throws org.omg.IOP.CodecPackage.FormatMismatch;

  /**
       * Converts the given any into a byte array based on the encoding 
       * format effective for this Codec. Only the data from the Any is 
       * encoded, not the <code>TypeCode</code>. 
       *
       * @param data The data, in the form of an Any, to be encoded into 
       *     a byte array. 
       * @return A byte array containing the data from the encoded any.
       * @exception InvalidTypeForEncoding thrown if the type is not valid for 
       *     the encoding format effective for this <code>Codec</code>.
       */
  byte[] encode_value (org.omg.CORBA.Any data) throws org.omg.IOP.CodecPackage.InvalidTypeForEncoding;

  /**
       * Decodes the given byte array into an Any based on the given 
       * <code>TypeCode</code> and the encoding format effective for 
       * this <code>Codec</code>. 
       *
       * @param data The data, in the form of a byte array, to be decoded 
       *     into an Any. 
       * @param tc The TypeCode to be used to decode the data. 
       * @return An Any containing the data from the decoded byte array.
       * @exception FormatMismatch thrown if the byte array cannot be 
       *     decoded into an Any. 
       */
  org.omg.CORBA.Any decode_value (byte[] data, org.omg.CORBA.TypeCode tc) throws org.omg.IOP.CodecPackage.FormatMismatch, org.omg.IOP.CodecPackage.TypeMismatch;
} // interface CodecOperations