コード例 #1
0
ファイル: StructuredTextFile.java プロジェクト: htools/htools
 public boolean nextRecord() {
   try {
     while (true) {
       ByteSearchSection section = reader.readSectionStart(root.section);
       if (validRecord(section)) {
         root.emptyDataContainer();
         section = root.readNode(section);
         reader.movePast(section);
         return true;
       }
       reader.movePast(section);
       if (!reader.hasMore()) {
         break;
       }
     }
   } catch (EOCException ex) {
   }
   root.emptyDataContainer();
   return false;
 }
コード例 #2
0
ファイル: StructuredTextFile.java プロジェクト: htools/htools
 public void read() {
   openRead();
   try {
     while (true) {
       ByteSearchSection section = reader.readSectionStart(root.section);
       if (section.notEmpty()) {
         section = root.readNode(section);
         reader.movePast(section);
       }
     }
   } catch (EOCException ex) {
   }
   closeRead();
 }
コード例 #3
0
ファイル: StructuredTextFile.java プロジェクト: htools/htools
 public void openRead() {
   checkFirstUse();
   if (datafile != null) {
     if (reader == null) {
       reader = datafile.rwbuffer;
     }
     datafile.openRead();
     if (hasHeader) {
       ByteSearchSection section = reader.readSectionStart(root.section);
       if (section.notEmpty()) {
         root.readHeader(section);
         reader.movePast(section);
       }
     }
   }
 }