Source for org.omg.CORBA.DataOutputStream

   1: /* DataOutputStream.java --
   2:    Copyright (C) 2005, 2006 Free Software Foundation, Inc.
   3: 
   4: This file is part of GNU Classpath.
   5: 
   6: GNU Classpath is free software; you can redistribute it and/or modify
   7: it under the terms of the GNU General Public License as published by
   8: the Free Software Foundation; either version 2, or (at your option)
   9: any later version.
  10: 
  11: GNU Classpath is distributed in the hope that it will be useful, but
  12: WITHOUT ANY WARRANTY; without even the implied warranty of
  13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14: General Public License for more details.
  15: 
  16: You should have received a copy of the GNU General Public License
  17: along with GNU Classpath; see the file COPYING.  If not, write to the
  18: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  19: 02110-1301 USA.
  20: 
  21: Linking this library statically or dynamically with other modules is
  22: making a combined work based on this library.  Thus, the terms and
  23: conditions of the GNU General Public License cover the whole
  24: combination.
  25: 
  26: As a special exception, the copyright holders of this library give you
  27: permission to link this library with independent modules to produce an
  28: executable, regardless of the license terms of these independent
  29: modules, and to copy and distribute the resulting executable under
  30: terms of your choice, provided that you also meet, for each linked
  31: independent module, the terms and conditions of the license of that
  32: module.  An independent module is a module which is not derived from
  33: or based on this library.  If you modify this library, you may extend
  34: this exception to your version of the library, but you are not
  35: obligated to do so.  If you do not wish to do so, delete this
  36: exception statement from your version. */
  37: 
  38: 
  39: package org.omg.CORBA;
  40: 
  41: import org.omg.CORBA.portable.ValueBase;
  42: 
  43: /**
  44:  * An interface for writing the custom value types. A value type, providing
  45:  * its own mechanism for writing the content, must implement
  46:  * the {@link CustomValue} that uses this interface.
  47:  *
  48:  * @see CustomValue
  49:  * @see CustomMarshal
  50:  *
  51:  * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
  52:  */
  53: public interface DataOutputStream
  54:   extends ValueBase
  55: {
  56:   /**
  57:    * Write {@link Any} to the output stream.
  58:    *
  59:    * @param value a value to write.
  60:    */
  61:   void write_any(Any value);
  62: 
  63:   /**
  64:    * Write boolean to the output stream.
  65:    *
  66:    * @param value a value to write.
  67:    */
  68:   void write_boolean(boolean value);
  69: 
  70:   /**
  71:    * Write narrow (usually 8 bit) char to the output stream.
  72:    *
  73:    * @param value a value to write.
  74:    */
  75:   void write_char(char value);
  76: 
  77:   /**
  78:    * Write wide (usually 16 bit) char to the output stream.
  79:    *
  80:    * @param value a value to write.
  81:    */
  82:   void write_wchar(char value);
  83: 
  84:   /**
  85:    * Write octet (byte) to the output stream.
  86:    *
  87:    * @param value a value to write.
  88:    */
  89:   void write_octet(byte value);
  90: 
  91:   /**
  92:    * Write short (16 bit signed integer) to the output stream.
  93:    *
  94:    * @param value a value to write.
  95:    */
  96:   void write_short(short value);
  97: 
  98:   /**
  99:    * Write unsigned short to the output stream.
 100:    *
 101:    * @param value a value to write.
 102:    */
 103:   void write_ushort(short value);
 104: 
 105:   /**
 106:    * Write CORBA long (32 bits, java int) to the output stream.
 107:    *
 108:    * @param value a value to write.
 109:    */
 110:   void write_long(int value);
 111: 
 112:   /**
 113:    * Write unsigned CORBA long (32 bits, java int) to the output stream.
 114:    *
 115:    * @param value a value to write.
 116:    */
 117:   void write_ulong(int value);
 118: 
 119:   /**
 120:    * Write CORBA long long (64 bits, java long) to the output stream.
 121:    *
 122:    * @param value a value to write.
 123:    */
 124:   void write_longlong(long value);
 125: 
 126:   /**
 127:    * Write unsigned CORBA long long (64 bits, java long) to the output stream.
 128:    *
 129:    * @param value a value to write.
 130:    */
 131:   void write_ulonglong(long value);
 132: 
 133:   /**
 134:    * Write float to the output stream.
 135:    *
 136:    * @param value a value to write.
 137:    */
 138:   void write_float(float value);
 139: 
 140:   /**
 141:    * Write double to the output stream.
 142:    *
 143:    * @param value a value to write.
 144:    */
 145:   void write_double(double value);
 146: 
 147:   /**
 148:    * Write narrow (usually 8 bits per character) string to the output stream.
 149:    *
 150:    * @param value a value to write.
 151:    */
 152:   void write_string(String value);
 153: 
 154:   /**
 155:    * Write wide (usually 16 bits per character) string to the output stream.
 156:    *
 157:    * @param value a value to write.
 158:    */
 159:   void write_wstring(String value);
 160: 
 161:   /**
 162:    * Write CORBA object reference to the output stream.
 163:    *
 164:    * @param value a value to write, null should be supported.
 165:    */
 166:   void write_Object(org.omg.CORBA.Object value);
 167: 
 168:   /**
 169:    * Write abstract interface to the output stream.
 170:    *
 171:    * @param value a value to write, can be either CORBA object or
 172:    * CORBA value type.
 173:    */
 174:   void write_Abstract(java.lang.Object value);
 175: 
 176:   /**
 177:    * Write value type to the output stream.
 178:    *
 179:    * @param value a value to write.
 180:    */
 181:   void write_Value(java.io.Serializable value);
 182: 
 183:   /**
 184:    * Write typecode to the output stream.
 185:    *
 186:    * @param value a value to write.
 187:    */
 188:   void write_TypeCode(TypeCode value);
 189: 
 190:   /**
 191:    * Write array of Any's to the output stream.
 192:    *
 193:    * @param seq a value to write.
 194:    */
 195:   void write_any_array(Any[] seq, int offset, int length);
 196: 
 197:   /**
 198:    * Write array of boolean's to the output stream.
 199:    *
 200:    * @param seq a value to write.
 201:    */
 202:   void write_boolean_array(boolean[] seq, int offset, int length);
 203: 
 204:   /**
 205:    * Write array of narrow chars to the output stream.
 206:    *
 207:    * @param seq a value to write.
 208:    */
 209:   void write_char_array(char[] seq, int offset, int length);
 210: 
 211:   /**
 212:    * Write array of wide chars to the output stream.
 213:    *
 214:    * @param seq a value to write.
 215:    */
 216:   void write_wchar_array(char[] seq, int offset, int length);
 217: 
 218:   /**
 219:    * Write array of octets (bytes) to the output stream.
 220:    *
 221:    * @param seq a value to write.
 222:    */
 223:   void write_octet_array(byte[] seq, int offset, int length);
 224: 
 225:   /**
 226:    * Write array of shorts (16 bit integers) to the output stream.
 227:    *
 228:    * @param seq a value to write.
 229:    */
 230:   void write_short_array(short[] seq, int offset, int length);
 231: 
 232:   /**
 233:    * Write array of unsigned shorts (16 bit integers) to the output stream.
 234:    *
 235:    * @param seq a value to write.
 236:    */
 237:   void write_ushort_array(short[] seq, int offset, int length);
 238: 
 239:   /**
 240:    * Write array of CORBA longs (java ints) to the output stream.
 241:    *
 242:    * @param seq a value to write.
 243:    */
 244:   void write_long_array(int[] seq, int offset, int length);
 245: 
 246:   /**
 247:    * Write array of unsigned CORBA longs (java ints) to the output stream.
 248:    *
 249:    * @param seq a value to write.
 250:    */
 251:   void write_ulong_array(int[] seq, int offset, int length);
 252: 
 253:   /**
 254:    * Write array of unsigned CORBA long longs (java longs)
 255:    * to the output stream.
 256:    *
 257:    * @param seq a value to write.
 258:    */
 259:   void write_ulonglong_array(long[] seq, int offset, int length);
 260: 
 261:   /**
 262:    * Write arrayo fo CORBA long longs (java ints) to the output stream.
 263:    *
 264:    * @param seq a value to write.
 265:    */
 266:   void write_longlong_array(long[] seq, int offset, int length);
 267: 
 268:   /**
 269:    * Write array of floats to the output stream.
 270:    *
 271:    * @param seq a value to write.
 272:    */
 273:   void write_float_array(float[] seq, int offset, int length);
 274: 
 275:   /**
 276:    * Write array of doubles to the output stream.
 277:    *
 278:    * @param seq a value to write.
 279:    */
 280:   void write_double_array(double[] seq, int offset, int length);
 281: }