|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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()
Must be called by all methods which access fields to ensure that the data has been uncompressed. |
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. |
int |
hashCode()
|
static Content |
read(DataInput in)
|
protected void |
readFieldsCompressed(DataInput in)
Subclasses implement this instead of CompressedWritable.readFields(DataInput) . |
void |
setContent(byte[] content)
|
void |
setContentType(String contentType)
|
void |
setMetadata(Metadata metadata)
Other protocol-specific data. |
String |
toString()
|
protected void |
writeCompressed(DataOutput out)
Subclasses implement this instead of CompressedWritable.write(DataOutput) . |
Methods inherited from class org.apache.hadoop.io.CompressedWritable |
---|
readFields, write |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, 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()
CompressedWritable
ensureInflated
in class CompressedWritable
protected final void readFieldsCompressed(DataInput in) throws IOException
CompressedWritable
CompressedWritable.readFields(DataInput)
.
readFieldsCompressed
in class CompressedWritable
IOException
protected final void writeCompressed(DataOutput out) throws IOException
CompressedWritable
CompressedWritable.write(DataOutput)
.
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 int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public void forceInflate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |