com.google.appengine.api.conversion
Class Asset

java.lang.Object
  extended by com.google.appengine.api.conversion.Asset

public final class Asset
extends java.lang.Object

An immutable asset for conversion. A conversion document must contain at least one asset, typically the document contents. Additional asset can be referenced from the main asset, such as in case of images or CSS files from HTML documents.


Constructor Summary
Asset(java.lang.String mimeType, byte[] data)
          Constructs an asset.
Asset(java.lang.String mimeType, byte[] data, java.lang.String name)
          Constructs an asset.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 byte[] getData()
          Returns the asset's data.
 java.lang.String getMimeType()
          Returns the asset's mime type.
 java.lang.String getName()
          Returns the asset's name, or null if not present.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Asset

public Asset(java.lang.String mimeType,
             byte[] data)
Constructs an asset.

Parameters:
mimeType - the asset's mime type
data - the asset's data

Asset

public Asset(java.lang.String mimeType,
             byte[] data,
             java.lang.String name)
Constructs an asset.

Parameters:
mimeType - the asset's mime type
data - the asset's data
name - the asset's name, or null if none
Method Detail

getMimeType

public java.lang.String getMimeType()
Returns the asset's mime type.


getData

public byte[] getData()
Returns the asset's data.


getName

public java.lang.String getName()
Returns the asset's name, or null if not present.


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object