public class FSSegmentWriter extends Object implements SegmentWriter
构造器和说明 |
---|
FSSegmentWriter(String crawlPath,
String segmentPath)
构造一个在指定文件夹写爬取信息的Writer
|
限定符和类型 | 方法和说明 |
---|---|
void |
close()
关闭Writer
|
void |
wrtieContent(Content content)
写入一条Content对象(存储网页/文件内容的对象)
|
void |
wrtieFetch(CrawlDatum fetch)
写入一条爬取历史记录
|
void |
wrtieParse(ParseResult parseresult)
写入一条网页解析结果
|
public void wrtieFetch(CrawlDatum fetch) throws IOException
wrtieFetch
在接口中 SegmentWriter
fetch
- 爬取历史记录(爬取任务)IOException
IOException
public void wrtieContent(Content content) throws IOException
wrtieContent
在接口中 SegmentWriter
content
- IOException
IOException
public void wrtieParse(ParseResult parseresult) throws IOException
wrtieParse
在接口中 SegmentWriter
parseresult
- 网页解析结果IOException
IOException
public void close() throws IOException
close
在接口中 SegmentWriter
IOException
IOException
Copyright © 2014. All Rights Reserved.