O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Classes

Holder Classes

The various holder classes allow Java to support out parameters. Because Java only passes objects by value, it has no way to let you modify a parameter value and pass the modified value back. A holder contains a value member variable that contains the holder's value.

value

The value member variable contains the value that this holder holds. The type of the variable is different for each type of holder. For an AnyHolder, the data type is Any. For an IntHolder, the type is int.

_read
public void _read(InputStream input)

Populates the holder data from the specified stream.

_type
public TypeCode _type()

Returns a TypeCode describing the type of object held by this holder.

 _write public void _write(OutputStream output) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required