org.jclouds.snia.cdmi.v1.domain
Class DataObject

java.lang.Object
  extended by org.jclouds.snia.cdmi.v1.domain.CDMIObject
      extended by org.jclouds.snia.cdmi.v1.domain.DataObject

public class DataObject
extends CDMIObject

Author:
Kenneth Nagin

Nested Class Summary
static class DataObject.Builder<B extends DataObject.Builder<B>>
           
 
Constructor Summary
protected DataObject(DataObject.Builder<?> builder)
           
 
Method Summary
static DataObject.Builder<?> builder()
           
 boolean equals(Object o)
           
 String getMimetype()
          get dataObject's mimetype.
 byte[] getValueAsByteArray()
          get dataObject's value as a ByteArray value character set is Charsets.UTF_8
 byte[] getValueAsByteArray(Charset charset)
          get dataObject's value as a InputStream
 File getValueAsFile(File destDir)
          get dataObject's value as a File value character set is Charsets.UTF_8
 File getValueAsFile(File destDir, Charset charset)
          get dataObject's value as a File
 com.google.common.io.InputSupplier<ByteArrayInputStream> getValueAsInputSupplier()
          get dataObject's value as a InputStream value character set is Charsets.UTF_8
 com.google.common.io.InputSupplier<ByteArrayInputStream> getValueAsInputSupplier(Charset charset)
          get dataObject's value as a InputStream
 String getValueAsString()
          get dataObject's value as a String
 int hashCode()
           
 com.google.common.base.Objects.ToStringHelper string()
           
 DataObject.Builder<?> toBuilder()
           
 
Methods inherited from class org.jclouds.snia.cdmi.v1.domain.CDMIObject
clone, getACLMetadata, getMetadata, getObjectID, getObjectName, getObjectType, getParentURI, getSystemMetadata, getUserMetadata, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataObject

protected DataObject(DataObject.Builder<?> builder)
Method Detail

builder

public static DataObject.Builder<?> builder()

toBuilder

public DataObject.Builder<?> toBuilder()
Overrides:
toBuilder in class CDMIObject

getMimetype

public String getMimetype()
get dataObject's mimetype.


getValueAsString

public String getValueAsString()
get dataObject's value as a String


getValueAsInputSupplier

public com.google.common.io.InputSupplier<ByteArrayInputStream> getValueAsInputSupplier()
get dataObject's value as a InputStream value character set is Charsets.UTF_8

Returns:
value

getValueAsInputSupplier

public com.google.common.io.InputSupplier<ByteArrayInputStream> getValueAsInputSupplier(Charset charset)
get dataObject's value as a InputStream

Parameters:
charset - value character set
Returns:
value

getValueAsByteArray

public byte[] getValueAsByteArray()
get dataObject's value as a ByteArray value character set is Charsets.UTF_8

Returns:
value

getValueAsByteArray

public byte[] getValueAsByteArray(Charset charset)
get dataObject's value as a InputStream

Parameters:
charset - value character set
Returns:
value

getValueAsFile

public File getValueAsFile(File destDir)
                    throws IOException
get dataObject's value as a File value character set is Charsets.UTF_8

Parameters:
destDir - destination directory
Returns:
value
Throws:
IOException

getValueAsFile

public File getValueAsFile(File destDir,
                           Charset charset)
                    throws IOException
get dataObject's value as a File

Parameters:
charset - value character set
Returns:
value
Throws:
IOException

equals

public boolean equals(Object o)
Overrides:
equals in class CDMIObject

hashCode

public int hashCode()
Overrides:
hashCode in class CDMIObject

string

public com.google.common.base.Objects.ToStringHelper string()
Overrides:
string in class CDMIObject


Copyright © 2009-2012 jclouds. All Rights Reserved.