home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / astro-src-2.1.0beta.tar.gz / astro-src-2.1.0beta.tar / astro-src-2.1.0beta / java / AstroAppInfo.java < prev    next >
Text File  |  2000-08-09  |  767b  |  39 lines

  1. import palmutils.pdb.*;
  2. import java.io.*;
  3.  
  4. public class AstroAppInfo extends PDBElement
  5. {
  6.     short numRecords; // # of records in the db.
  7.     short currRecord; // Last place we looked for a record.
  8.  
  9.     public String toString() 
  10.     {
  11.         return "["+numRecords+","+currRecord+"]";
  12.     }
  13.     
  14.     public int getSize() 
  15.     {
  16.         return 4;
  17.     }
  18.     
  19.     public void write(DataOutput out) throws IOException 
  20.     {
  21.         out.writeShort(numRecords);
  22.         out.writeShort(currRecord);
  23.     }
  24.  
  25.     public void read(DataInput in) throws IOException 
  26.     {
  27.         numRecords = in.readShort();
  28.         currRecord = in.readShort();
  29.     }
  30.  
  31.     public AstroAppInfo() 
  32.     {}
  33.  
  34.     public AstroAppInfo(DataInput in) throws IOException
  35.     {
  36.         read(in);
  37.     }
  38. }
  39.