예제 #1
0
 @Override
 public ByteSearchSection process(Content content, ByteSearchSection section) {
   ByteSearchPosition end = endmarker.findPos(section);
   if (end.found() && end.start > section.innerstart) {
     return content.addSectionPos(
         outputsection, content.content, section.start, section.innerstart, end.start, end.end);
   }
   return null;
 }
예제 #2
0
 public boolean findFirstRecord() {
   if (getOffset() == 0 && getOffset() < getCeiling()) {
     return true;
   }
   ByteSearchPosition matchPos = datafile.matchPos(root.section);
   if (matchPos.found()) {
     datafile.movePast(matchPos);
     return getOffset() < getCeiling();
   }
   return false;
 }
예제 #3
0
 @Override
 public ByteSearchSection process(Content content, ByteSearchSection section) {
   int tagclose = findQuoteSafeTagEnd(section);
   if (tagclose > -1) {
     ByteSearchPosition end = endmarker.findPos(section, tagclose);
     if (end.found()) {
       ByteSearchSection s =
           content.addSectionPos(
               outputsection, content.content, section.start, tagclose, end.start, end.end);
       return s;
     }
   }
   return null;
 }
예제 #4
0
 private void check(String content) {
   if (!checked && open != null && open != ByteSearch.EMPTY) {
     if (open.match(content)) {
       log.fatalexception(
           new RuntimeException(),
           "StructuredTextFile.JsonField value matches open tag: [%s]\n%s",
           open.toString(),
           content);
     }
     if (close != null && close.exists(content)) {
       ByteSearchPosition findPos = close.findPos(content);
       if (findPos.notEmpty()) {
         log.fatalexception(
             new RuntimeException(),
             "StructuredTextFile.JsonField value matches close tag: [%s]\n%s",
             close.toString(),
             content);
       }
     }
     checked = true;
   }
 }