org.ektorp
Class Attachment
java.lang.Object
org.ektorp.Attachment
- All Implemented Interfaces:
- Serializable
public class Attachment
- extends Object
- implements Serializable
- Author:
- henrik lundgren
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Attachment
public Attachment(String id,
String data,
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-encodedcontentType
- contentLength
-
getContentType
public String getContentType()
getContentLength
public long getContentLength()
getDataBase64
public String getDataBase64()
- Only populated if this attachment was created with data as String constructor.
- Returns:
getId
public String getId()
isStub
public boolean isStub()
getRevpos
public int getRevpos()
setRevpos
public void setRevpos(int revpos)
getDigest
public String getDigest()
getAnonymous
public Map<String,Object> getAnonymous()
- Returns:
- a Map containing fields that did not map to any other field in the class during object deserializarion from a JSON document.
setAnonymous
public void setAnonymous(String key,
Object value)
- Parameters:
key
- value
-
Copyright © 2011. All Rights Reserved.