Package com.subgraph.orchid.directory.parsing

Examples of com.subgraph.orchid.directory.parsing.DocumentFieldParser


    return new RouterDescriptorParser(new DocumentFieldParserImpl(buffer), verifySignatures);
  }

  public DocumentParser<RouterMicrodescriptor> createRouterMicrodescriptorParser(ByteBuffer buffer) {
    buffer.rewind();
    DocumentFieldParser dfp = new DocumentFieldParserImpl(buffer);
    return new RouterMicrodescriptorParser(dfp);
  }
View Full Code Here


    for(String entry: dirServers) {
      builder.append(entry);
      builder.append('\n');
    }
    final ByteBuffer buffer = ByteBuffer.wrap(builder.toString().getBytes(Tor.getDefaultCharset()));
    final DocumentFieldParser parser = new DocumentFieldParserImpl(buffer);
   
    parser.setHandler(new DocumentParsingHandler() {
      public void endOfDocument() {}
      public void parseKeywordLine() { processKeywordLine(parser);}
    });
    parser.processDocument();
  }
View Full Code Here

TOP

Related Classes of com.subgraph.orchid.directory.parsing.DocumentFieldParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.