Top Description Fields Constructors Methods
org.apache.derby.iapi.services.io

public Class FormatableIntHolder

extends Object
implements Formatable
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.services.io.Formatable, org.apache.derby.iapi.services.io.TypedFormat, java.io.Externalizable, java.io.Serializable
Imports
java.io.ObjectOutput, .ObjectInput, .IOException

A formatable holder for an int.

Field Summary

Modifier and TypeField and Description
private int
theInt

This class implements Formatable.

Constructor Summary

AccessConstructor and Description
public
FormatableIntHolder()

Niladic constructor for formatable

public
FormatableIntHolder(int
the int to hold
theInt
)

Construct a FormatableIntHolder using the input int.

Method Summary

Modifier and TypeMethod and Description
public static FormatableIntHolder[]

Returns:

An array of FormatableIntHolders
getFormatableIntHolders
(int[]
The array of ints
theInts
)

Create and return an array of FormatableIntHolders given an array of ints.

public int

Returns:

The held int.
getInt
()

Get the held int.

public int

Returns:

the formatID of this class
getTypeFormatId
()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get the formatID which corresponds to this class.

public void
readExternal(ObjectInput
read this.
in
)

Implements java.io.Externalizable.readExternal.

Read this formatable from a stream of stored objects.

public void
setInt(int
the int to hold
theInt
)

Set the held int to the input int.

public void
writeExternal(ObjectOutput
write bytes here
out
)

Implements java.io.Externalizable.writeExternal.

Write this formatable out

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

theIntback to summary
private int theInt

This class implements Formatable. That means that it can write itself to and from a formatted stream. If you add more fields to this class, make sure that you also write/read them with the writeExternal()/readExternal() methods. If, inbetween releases, you add more fields to this class, then you should bump the version number emitted by the getTypeFormatId() method.

Constructor Detail

FormatableIntHolderback to summary
public FormatableIntHolder()

Niladic constructor for formatable

FormatableIntHolderback to summary
public FormatableIntHolder(int theInt)

Construct a FormatableIntHolder using the input int.

Parameters
theInt:int

the int to hold

Method Detail

getFormatableIntHoldersback to summary
public static FormatableIntHolder[] getFormatableIntHolders(int[] theInts)

Create and return an array of FormatableIntHolders given an array of ints.

Parameters
theInts:int[]

The array of ints

Returns:FormatableIntHolder[]

An array of FormatableIntHolders

getIntback to summary
public int getInt()

Get the held int.

Returns:int

The held int.

getTypeFormatIdback to summary
public int getTypeFormatId()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get the formatID which corresponds to this class.

Returns:int

the formatID of this class

readExternalback to summary
public void readExternal(ObjectInput in) throws IOException

Implements java.io.Externalizable.readExternal.

Read this formatable from a stream of stored objects.

Parameters
in:ObjectInput

read this.

Exceptions
IOException:
thrown on error
setIntback to summary
public void setInt(int theInt)

Set the held int to the input int.

Parameters
theInt:int

the int to hold

writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Write this formatable out

Parameters
out:ObjectOutput

write bytes here

Exceptions
IOException:
thrown on error