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