duke@1: /*
ohair@158: * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1: *
duke@1: * This code is free software; you can redistribute it and/or modify it
duke@1: * under the terms of the GNU General Public License version 2 only, as
ohair@158: * published by the Free Software Foundation. Oracle designates this
duke@1: * particular file as subject to the "Classpath" exception as provided
ohair@158: * by Oracle in the LICENSE file that accompanied this code.
duke@1: *
duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1: * version 2 for more details (a copy is included in the LICENSE file that
duke@1: * accompanied this code).
duke@1: *
duke@1: * You should have received a copy of the GNU General Public License version
duke@1: * 2 along with this work; if not, write to the Free Software Foundation,
duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1: *
ohair@158: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@158: * or visit www.oracle.com if you need additional information or have any
ohair@158: * questions.
duke@1: */
duke@1: package org.omg.CORBA.portable;
duke@1:
duke@1: import org.omg.CORBA.TypeCode;
duke@1: import org.omg.CORBA.Principal;
duke@1: import org.omg.CORBA.Any;
duke@1:
duke@1: /**
duke@1: * OuputStream is the Java API for writing IDL types
duke@1: * to CDR marshal streams. These methods are used by the ORB to
duke@1: * marshal IDL types as well as to insert IDL types into Anys.
duke@1: * The _array
versions of the methods can be directly
duke@1: * used to write sequences and arrays of IDL types.
duke@1: *
duke@1: * @since JDK1.2
duke@1: */
duke@1:
duke@1:
duke@1: public abstract class OutputStream extends java.io.OutputStream
duke@1: {
duke@1: /**
duke@1: * Returns an input stream with the same buffer.
duke@1: *@return an input stream with the same buffer.
duke@1: */
duke@1: public abstract InputStream create_input_stream();
duke@1:
duke@1: /**
duke@1: * Writes a boolean value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_boolean(boolean value);
duke@1: /**
duke@1: * Writes a char value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_char(char value);
duke@1: /**
duke@1: * Writes a wide char value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_wchar(char value);
duke@1: /**
duke@1: * Writes a CORBA octet (i.e. byte) value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_octet(byte value);
duke@1: /**
duke@1: * Writes a short value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_short(short value);
duke@1: /**
duke@1: * Writes an unsigned short value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_ushort(short value);
duke@1: /**
duke@1: * Writes a CORBA long (i.e. Java int) value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_long(int value);
duke@1: /**
duke@1: * Writes an unsigned CORBA long (i.e. Java int) value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_ulong(int value);
duke@1: /**
duke@1: * Writes a CORBA longlong (i.e. Java long) value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_longlong(long value);
duke@1: /**
duke@1: * Writes an unsigned CORBA longlong (i.e. Java long) value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_ulonglong(long value);
duke@1: /**
duke@1: * Writes a float value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_float(float value);
duke@1: /**
duke@1: * Writes a double value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_double(double value);
duke@1: /**
duke@1: * Writes a string value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_string(String value);
duke@1: /**
duke@1: * Writes a wide string value to this stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_wstring(String value);
duke@1:
duke@1: /**
duke@1: * Writes an array of booleans on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_boolean_array(boolean[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of chars on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_char_array(char[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of wide chars on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_wchar_array(char[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of CORBA octets (bytes) on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_octet_array(byte[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of shorts on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_short_array(short[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of unsigned shorts on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_ushort_array(short[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of CORBA longs (i.e. Java ints) on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_long_array(int[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of unsigned CORBA longs (i.e. Java ints) on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_ulong_array(int[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of CORBA longlongs (i.e. Java longs) on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_longlong_array(long[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of unsigned CORBA longlongs (i.e. Java ints) on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_ulonglong_array(long[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of floats on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_float_array(float[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes an array of doubles on this output stream.
duke@1: * @param value the array to be written.
duke@1: * @param offset offset on the stream.
duke@1: * @param length length of buffer to write.
duke@1: */
duke@1: public abstract void write_double_array(double[] value, int offset,
duke@1: int length);
duke@1: /**
duke@1: * Writes a CORBA Object on this output stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_Object(org.omg.CORBA.Object value);
duke@1: /**
duke@1: * Writes a TypeCode on this output stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_TypeCode(TypeCode value);
duke@1: /**
duke@1: * Writes an Any on this output stream.
duke@1: * @param value the value to be written.
duke@1: */
duke@1: public abstract void write_any(Any value);
duke@1:
duke@1: /**
duke@1: * Writes a Principle on this output stream.
duke@1: * @param value the value to be written.
duke@1: * @deprecated Deprecated by CORBA 2.2.
duke@1: */
duke@1: @Deprecated
duke@1: public void write_Principal(Principal value) {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Writes an integer (length of arrays) onto this stream.
duke@1: * @param b the value to be written.
duke@1: * @throws java.io.IOException if there is an input/output error
duke@1: * @see portable
duke@1: * package comments for unimplemented features
duke@1: */
duke@1: public void write(int b) throws java.io.IOException {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Writes a BigDecimal number.
duke@1: * @param value a BidDecimal--value to be written.
duke@1: */
duke@1: public void write_fixed(java.math.BigDecimal value) {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Writes a CORBA context on this stream. The
duke@1: * Context is marshaled as a sequence of strings.
duke@1: * Only those Context values specified in the contexts
duke@1: * parameter are actually written.
duke@1: * @param ctx a CORBA context
duke@1: * @param contexts a ContextList
object containing the list of contexts
duke@1: * to be written
duke@1: * @see portable
duke@1: * package comments for unimplemented features
duke@1: */
duke@1: public void write_Context(org.omg.CORBA.Context ctx,
duke@1: org.omg.CORBA.ContextList contexts) {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Returns the ORB that created this OutputStream.
duke@1: * @return the ORB that created this OutputStream
duke@1: * @see portable
duke@1: * package comments for unimplemented features
duke@1: */
duke@1: public org.omg.CORBA.ORB orb() {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1: }