/[classpath]/classpath/org/omg/CORBA/ULongLongSeqHelper.java
ViewVC logotype

Diff of /classpath/org/omg/CORBA/ULongLongSeqHelper.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by audriusa, Sat Mar 12 17:00:10 2005 UTC revision 1.2 by audriusa, Fri Apr 29 16:47:41 2005 UTC
# Line 106  public abstract class ULongLongSeqHelper Line 106  public abstract class ULongLongSeqHelper
106    
107    /**    /**
108     * Reads the <code>long[]</code> from the CORBA input stream.     * Reads the <code>long[]</code> from the CORBA input stream.
    * This implementation first creates an instance of  
    * {@link ULongLongSeqHolder} and then delegates functionality  
    * to its <code>_read()</code> method.  
109     *     *
110     * @param input the CORBA (not java.io) stream to read from.     * @param input the CORBA (not java.io) stream to read from.
111     * @return the value from the stream.     * @return the value from the stream.
112     */     */
113    public static long[] read(InputStream input)    public static long[] read(InputStream input)
114    {    {
115      ULongLongSeqHolder h = new ULongLongSeqHolder();      long[] value = new long[ input.read_long() ];
116      h._read(input);      input.read_ulonglong_array(value, 0, value.length);
117      return h.value;      return value;
118    }    }
119    
120    /**    /**
# Line 128  public abstract class ULongLongSeqHelper Line 125  public abstract class ULongLongSeqHelper
125     */     */
126    public static TypeCode type()    public static TypeCode type()
127    {    {
128      return new primitiveArrayTypeCode(TCKind.tk_long);      return new primitiveArrayTypeCode(TCKind.tk_ulong);
129    }    }
130    
131    /**    /**
132     * Writes the <code>long[]</code> into the given stream.     * Writes the <code>long[]</code> into the given stream.
    * This implementation first creates an instance of  
    * {@link ULongLongSeqHolder} and then delegates functionality  
    * to its <code>_write()</code> method.  
133     *     *
134     * @param output the CORBA (not java.io) output stream to write.     * @param output the CORBA (not java.io) output stream to write.
135     * @param value the value that must be written.     * @param value the value that must be written.
136     */     */
137    public static void write(OutputStream output, long[] value)    public static void write(OutputStream output, long[] value)
138    {    {
139      ULongLongSeqHolder h = new ULongLongSeqHolder(value);      output.write_long(value.length);
140      h._write(output);      output.write_ulonglong_array(value, 0, value.length);
141    }    }
142  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26