src/main/java/org/lightcouch/CouchDbClientBase.java
public Response saveAttachment(InputStream in, String name, String contentType, String docId, String docRev) {
		assertNotEmpty(in, "in");
		assertNotEmpty(name, "name");
		assertNotEmpty(contentType, "ContentType");
		assertNotEmpty(docId, "docId");
		final URI uri = buildUri(getDBUri()).pathEncoded(docId).path("/").path(name).query("rev", docRev).build();
		return put(uri, in, contentType);
	}
public Response saveAttachment(InputStream in, String name, String contentType, String docId, String docRev) {
		assertNotEmpty(in, "in");
		assertNotEmpty(name, "name");
		assertNotEmpty(contentType, "ContentType");
		assertNotEmpty(docId, "docId");
		final URI uri = buildUri(getDBUri()).pathEncoded(docId).path("/").path(name).query("rev", docRev).build();
		return put(uri, in, contentType);
	}
public Response saveAttachment ( InputStream in , String name , String contentType , String docId , String docRev ) { assertNotEmpty ( in , "in" ) ; assertNotEmpty ( name , "name" ) ; assertNotEmpty ( contentType , "ContentType" ) ; assertNotEmpty ( docId , "docId" ) ; final URI uri = buildUri ( getDBUri ( ) ) . pathEncoded ( docId ) . path ( "/" ) . path ( name ) . query ( "rev" , docRev ) . build ( ) ; return put ( uri , in , contentType ) ; }
Saves an attachment to an existing document given both a document id
and revision, or save to a new document given only the id, and rev as {@code null}.
<p>To retrieve an attachment, see {@link #find(String)}.
@param in The {@link InputStream} holding the binary data.
@param name The attachment name.
@param contentType The attachment "Content-Type".
@param docId The document id to save the attachment under, or {@code null} to save under a new document.
@param docRev The document revision to save the attachment under, or {@code null} when saving to a new document.
@return {@link Response}
Saves an attachment to an existing document given both a document id and revision or save to a new document given only the id and rev as {