|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.io.CompressedWritable
org.apache.nutch.protocol.Content
public final class Content
Field Summary | |
---|---|
static String |
DIR_NAME
|
Constructor Summary | |
---|---|
Content()
|
|
Content(String url,
String base,
byte[] content,
String contentType,
Metadata metadata,
Configuration conf)
|
Method Summary | |
---|---|
void |
ensureInflated()
|
boolean |
equals(Object o)
|
void |
forceInflate()
By calling this method caller forces the next access to any property (via getters and setters) to check if decompressing of data is really required. |
String |
getBaseUrl()
The base url for relative links contained in the content. |
byte[] |
getContent()
The binary content retrieved. |
String |
getContentType()
The media type of the retrieved content. |
Metadata |
getMetadata()
Other protocol-specific data. |
String |
getUrl()
The url fetched. |
static void |
main(String[] argv)
|
static Content |
read(DataInput in)
|
protected void |
readFieldsCompressed(DataInput in)
|
void |
setContent(byte[] content)
|
void |
setContentType(String contentType)
|
void |
setMetadata(Metadata metadata)
Other protocol-specific data. |
String |
toString()
|
protected void |
writeCompressed(DataOutput out)
|
Methods inherited from class org.apache.hadoop.io.CompressedWritable |
---|
readFields, write |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DIR_NAME
Constructor Detail |
---|
public Content()
public Content(String url, String base, byte[] content, String contentType, Metadata metadata, Configuration conf)
Method Detail |
---|
public void ensureInflated()
ensureInflated
in class CompressedWritable
protected final void readFieldsCompressed(DataInput in) throws IOException
readFieldsCompressed
in class CompressedWritable
IOException
protected final void writeCompressed(DataOutput out) throws IOException
writeCompressed
in class CompressedWritable
IOException
public static Content read(DataInput in) throws IOException
IOException
public String getUrl()
public String getBaseUrl()
public byte[] getContent()
public void setContent(byte[] content)
public String getContentType()
public void setContentType(String contentType)
public Metadata getMetadata()
public void setMetadata(Metadata metadata)
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
public static void main(String[] argv) throws Exception
Exception
public void forceInflate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |