1. /*
  2. * @(#)Streamable.java 1.21 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package org.omg.CORBA.portable;
  8. import org.omg.CORBA.TypeCode;
  9. /**
  10. * The base class for the Holder classess of all complex
  11. * IDL types. The ORB treats all generated Holders as Streamable to invoke
  12. * the methods for marshalling and unmarshalling.
  13. *
  14. * @version 1.11, 03/18/98
  15. * @since JDK1.2
  16. */
  17. public interface Streamable {
  18. /**
  19. * Reads data from <code>istream</code> and initalizes the
  20. * <code>value</code> field of the Holder with the unmarshalled data.
  21. *
  22. * @param istream the InputStream that represents the CDR data from the wire.
  23. */
  24. void _read(InputStream istream);
  25. /**
  26. * Marshals to <code>ostream</code> the value in the
  27. * <code>value</code> field of the Holder.
  28. *
  29. * @param ostream the CDR OutputStream
  30. */
  31. void _write(OutputStream ostream);
  32. /**
  33. * Retrieves the <code>TypeCode</code> object corresponding to the value
  34. * in the <code>value</code> field of the Holder.
  35. *
  36. * @return the <code>TypeCode</code> object for the value held in the holder
  37. */
  38. TypeCode _type();
  39. }