public final class Content extends Object implements org.apache.hadoop.io.Writable
Constructor and Description |
---|
Content() |
Content(String url,
String base,
byte[] content,
String contentType,
Metadata metadata,
org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
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) |
void |
readFields(DataInput in) |
void |
setContent(byte[] content) |
void |
setContentType(String contentType) |
void |
setMetadata(Metadata metadata)
Other protocol-specific data.
|
String |
toString() |
void |
write(DataOutput out) |
public static final String DIR_NAME
public final void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public final void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
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)
Copyright © 2014 The Apache Software Foundation