org.ektorp
Class Attachment

java.lang.Object
  extended by org.ektorp.Attachment
All Implemented Interfaces:
java.io.Serializable

public class Attachment
extends java.lang.Object
implements java.io.Serializable

Author:
henrik lundgren
See Also:
Serialized Form

Constructor Summary
Attachment(java.lang.String id, java.io.InputStream data, java.lang.String contentType, int contentLength)
           
Attachment(java.lang.String id, java.lang.String data, java.lang.String contentType)
          Constructor that takes data as String.
 
Method Summary
 java.lang.String getContentType()
           
 java.io.InputStream getData()
           
 java.lang.String getDataBase64()
          Only populated if this attachment was created with data as String constructor.
 java.lang.String getId()
           
 int getLength()
           
 int getRevpos()
           
 boolean isStub()
           
 void setRevpos(int revpos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attachment

public Attachment(java.lang.String id,
                  java.io.InputStream data,
                  java.lang.String contentType,
                  int contentLength)
Parameters:
id -
data -
contentType -
contentLength -

Attachment

public Attachment(java.lang.String id,
                  java.lang.String data,
                  java.lang.String contentType)
Constructor that takes data as String. The data must be base64 encoded single line of characters, so pre-process your data to remove any carriage returns and newlines Useful if you want to save the attachment as an inline attachent.

Parameters:
id -
data - base64-encoded
contentType -
contentLength -
Method Detail

getContentType

public java.lang.String getContentType()

getLength

public int getLength()

getDataBase64

public java.lang.String getDataBase64()
Only populated if this attachment was created with data as String constructor.

Returns:

getData

public java.io.InputStream getData()

getId

public java.lang.String getId()

isStub

public boolean isStub()

getRevpos

public int getRevpos()

setRevpos

public void setRevpos(int revpos)


Copyright © 2010. All Rights Reserved.