本文整理汇总了Java中com.subgraph.orchid.directory.parsing.DocumentObject类的典型用法代码示例。如果您正苦于以下问题:Java DocumentObject类的具体用法?Java DocumentObject怎么用?Java DocumentObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DocumentObject类属于com.subgraph.orchid.directory.parsing包,在下文中一共展示了DocumentObject类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: parseObject
import com.subgraph.orchid.directory.parsing.DocumentObject; //导入依赖的package包/类
public DocumentObject parseObject() {
final String line = readLine();
final String keyword = parseObjectHeader(line);
final DocumentObject object = new DocumentObject(keyword, line);
parseObjectBody(object, keyword);
return object;
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:8,代码来源:DocumentFieldParserImpl.java
示例2: parseObjectBody
import com.subgraph.orchid.directory.parsing.DocumentObject; //导入依赖的package包/类
private void parseObjectBody(DocumentObject object, String keyword) {
final String endTag = END_TAG +" "+ keyword +TAG_DELIMITER;
while(true) {
final String line = readLine();
if(line == null) {
throw new TorParsingException("EOF reached before end of '"+ keyword +"' object.");
}
if(line.equals(endTag)) {
object.addFooterLine(line);
return;
}
parseObjectContent(object, line);
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:15,代码来源:DocumentFieldParserImpl.java
示例3: createIntroductionPointBuffer
import com.subgraph.orchid.directory.parsing.DocumentObject; //导入依赖的package包/类
private ByteBuffer createIntroductionPointBuffer(DocumentObject ob) {
final byte[] content = Base64.decode(ob.getContent(false));
if(content[0] == 'i') {
return ByteBuffer.wrap(content);
} else {
try {
byte[] decrypted = authentication.decryptIntroductionPoints(content);
return ByteBuffer.wrap(decrypted);
} catch (HSAuthenticationException e) {
throw new TorParsingException("Failed to decrypt introduction points: "+ e.getMessage());
}
}
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:14,代码来源:HSDescriptorParser.java
示例4: parsePublicKey
import com.subgraph.orchid.directory.parsing.DocumentObject; //导入依赖的package包/类
public TorPublicKey parsePublicKey() {
final DocumentObject documentObject = parseObject();
return TorPublicKey.createFromPEMBuffer(documentObject.getContent());
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:5,代码来源:DocumentFieldParserImpl.java
示例5: parseSignature
import com.subgraph.orchid.directory.parsing.DocumentObject; //导入依赖的package包/类
public TorSignature parseSignature() {
final DocumentObject documentObject = parseObject();
TorSignature s = TorSignature.createFromPEMBuffer(documentObject.getContent());
return s;
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:6,代码来源:DocumentFieldParserImpl.java
示例6: parseTypedObject
import com.subgraph.orchid.directory.parsing.DocumentObject; //导入依赖的package包/类
public DocumentObject parseTypedObject(String type) {
final DocumentObject object = parseObject();
if(!type.equals(object.getKeyword()))
throw new TorParsingException("Unexpected object type. Expecting: "+ type +", but got: "+ object.getKeyword());
return object;
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:7,代码来源:DocumentFieldParserImpl.java
示例7: parseObjectContent
import com.subgraph.orchid.directory.parsing.DocumentObject; //导入依赖的package包/类
private void parseObjectContent(DocumentObject object, String content) {
// XXX verify legal base64 data
object.addContent(content);
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:5,代码来源:DocumentFieldParserImpl.java
注:本文中的com.subgraph.orchid.directory.parsing.DocumentObject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论