Exemple #1
0
 internal FieldDescriptor(DBase3 enclosingInstance, System.String name, short length, sbyte type)
 {
     InitBlock(enclosingInstance);
     this.name   = name;
     this.length = length;
     this.type   = type;
 }
Exemple #2
0
        public static void  Main1(System.String[] args)
        {
            DBase3       db  = new DBase3("dbase3.dbf", false);
            DBase3Record rec = null;

            for (int i = 0; i < db.NumRecords; i++)
            {
                rec = db.read(i);
                //UPGRADE_TODO: Method 'java.io.PrintStream.println' was converted to 'System.Console.WriteLine' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073"'
                System.Console.Out.WriteLine(rec);
            }
            //UPGRADE_TODO: Method 'java.io.PrintStream.println' was converted to 'System.Console.WriteLine' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073"'
            System.Console.Out.WriteLine(rec);
        }
Exemple #3
0
 /// <summary>  Constructor for the FieldDescriptor object
 ///
 /// </summary>
 /// <exception cref="">  IOException  Description of the Exception
 /// </exception>
 internal FieldDescriptor(DBase3 enclosingInstance)
 {
     InitBlock(enclosingInstance);
     sbyte[] buffer = new sbyte[11];
     SupportClass.ReadInput(Enclosing_Instance.db, ref buffer, 0, buffer.Length);
     type = (sbyte)Enclosing_Instance.db.ReadByte();
     Enclosing_Instance.db.Seek(Enclosing_Instance.db.Position + 4, System.IO.SeekOrigin.Begin);
     length = (sbyte)Enclosing_Instance.db.ReadByte();
     name   = twinfeats.db.DBase3.getString(buffer, 11);
     if (length < 0)
     {
         length = (short)(length + 256);
     }
 }
 /// <summary>  Constructor for the DBase3Record object
 ///
 /// </summary>
 /// <param name="db">              Description of the Parameter
 /// </param>
 /// <exception cref="">  IOException  Description of the Exception
 /// </exception>
 public DBase3Record(DBase3 db)
 {
     this.db = db;
     values  = new System.String[db.fields.Length];
     sbyte[] buffer = new sbyte[db.longestFieldLength];
     deleted = (db.db.ReadByte() == (int)'*');
     for (int i = 0; i < values.Length; i++)
     {
         //			buffer = new byte[db.fields[i].length];
         if (!db.cache)
         {
             SupportClass.ReadInput(db.db, ref buffer, 0, db.fields[i].length);
         }
         else
         {
             Array.Copy(SupportClass.ToByteArray(db.fileBuffer), db.fileOffset, SupportClass.ToByteArray(buffer), 0, db.fields[i].length);
             db.fileOffset += db.fields[i].length;
         }
         //			System.out.println(new String(buffer));
         values[i] = DBase3.getString(buffer, db.fields[i].length);
         //			System.out.println(values[i]);
     }
 }
 public DBase3Record(DBase3 db, int numfields)
 {
     values  = new System.String[numfields];
     this.db = db;
 }
Exemple #6
0
 private void  InitBlock(DBase3 enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }