Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.iapi.services.io
Class FormatableIntHolder  view FormatableIntHolder download FormatableIntHolder.java

java.lang.Object
  extended byorg.apache.derby.iapi.services.io.FormatableIntHolder
All Implemented Interfaces:
java.io.Externalizable, Formatable, java.io.Serializable, TypedFormat

public class FormatableIntHolder
extends java.lang.Object
implements Formatable

A formatable holder for an int.


Field Summary
private  int theInt
          This class implements Formatable.
 
Constructor Summary
FormatableIntHolder()
          Niladic constructor for formatable
FormatableIntHolder(int theInt)
          Construct a FormatableIntHolder using the input int.
 
Method Summary
static FormatableIntHolder[] getFormatableIntHolders(int[] theInts)
          Create and return an array of FormatableIntHolders given an array of ints.
 int getInt()
          Get the held int.
 int getTypeFormatId()
          Get the formatID which corresponds to this class.
 void readExternal(ArrayInputStream in)
           
 void readExternal(java.io.ObjectInput in)
          Read this formatable from a stream of stored objects.
 void setInt(int theInt)
          Set the held int to the input int.
 void writeExternal(java.io.ObjectOutput out)
          Write this formatable out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theInt

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

FormatableIntHolder

public FormatableIntHolder()
Niladic constructor for formatable


FormatableIntHolder

public FormatableIntHolder(int theInt)
Construct a FormatableIntHolder using the input int.

Method Detail

setInt

public void setInt(int theInt)
Set the held int to the input int.


getInt

public int getInt()
Get the held int.


getFormatableIntHolders

public static FormatableIntHolder[] getFormatableIntHolders(int[] theInts)
Create and return an array of FormatableIntHolders given an array of ints.


writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Write this formatable out

Specified by:
writeExternal in interface java.io.Externalizable

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException
Read this formatable from a stream of stored objects.

Specified by:
readExternal in interface java.io.Externalizable

readExternal

public void readExternal(ArrayInputStream in)
                  throws java.io.IOException

getTypeFormatId

public int getTypeFormatId()
Get the formatID which corresponds to this class.

Specified by:
getTypeFormatId in interface TypedFormat