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

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

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

revision 1.1 by audriusa, Sat Mar 19 20:05:28 2005 UTC revision 1.2 by audriusa, Fri Apr 29 16:47:40 2005 UTC
# Line 114  public abstract class AnySeqHelper Line 114  public abstract class AnySeqHelper
114     */     */
115    public static Any[] read(InputStream input)    public static Any[] read(InputStream input)
116    {    {
117      AnySeqHolder h = new AnySeqHolder();      Any[] value = new Any[ input.read_long() ];
118      h._read(input);      for (int i = 0; i < value.length; i++)
119      return h.value;        {
120            value [ i ] = input.read_any();
121          }
122        return value;
123    }    }
124    
125    /**    /**
# Line 132  public abstract class AnySeqHelper Line 135  public abstract class AnySeqHelper
135    
136    /**    /**
137     * Writes the array of {@link Any}'s into the given stream.     * Writes the array of {@link Any}'s into the given stream.
    * This implementation first creates an instance of  
    * {@link AnySeqHolder} and then delegates functionality  
    * to its <code>_write()</code> method.  
138     *     *
139     * @param output the CORBA (not java.io) output stream to write.     * @param output the CORBA (not java.io) output stream to write.
140     * @param value the value that must be written.     * @param value the value that must be written.
141     */     */
142    public static void write(OutputStream output, Any[] value)    public static void write(OutputStream output, Any[] value)
143    {    {
144      AnySeqHolder h = new AnySeqHolder(value);      output.write_long(value.length);
145      h._write(output);  
146        for (int i = 0; i < value.length; i++)
147          {
148            output.write_any(value [ i ]);
149          }
150    }    }
151  }  }

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