@@ -0,0 +1,1946 @@
+package com.couchbase.cblite.internal;%0A%0Aimport com.couchbase.cblite.CBLBlobKey;%0A%0A/**%0A *  A simple container for attachment metadata.%0A */%0Apublic class CBLAttachmentInternal %7B%0A%0A    public enum CBLAttachmentEncoding %7B%0A        CBLAttachmentEncodingNone, kCBLAttachmentEncodingGZIP%0A    %7D%0A%0A    private String name;%0A    private String contentType;%0A%0A    private CBLBlobKey blobKey;%0A    private long length;%0A    private long encodedLength;%0A    private CBLAttachmentEncoding encoding;%0A    private int revpos;%0A%0A    public CBLAttachmentInternal(String name, String contentType) %7B%0A        this.name = name;%0A        this.contentType = contentType;%0A    %7D%0A%0A    public boolean isValid() %7B%0A        if (encoding != CBLAttachmentEncoding.CBLAttachmentEncodingNone) %7B%0A            if (encodedLength == 0 && length %3E 0) %7B%0A                return false;%0A            %7D%0A        %7D%0A        else if (encodedLength %3E 0) %7B%0A            return false;%0A        %7D%0A        if (revpos == 0) %7B%0A            return false;%0A        %7D%0A        return true;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public String getContentType() %7B%0A        return contentType;%0A    %7D%0A%0A    public CBLBlobKey getBlobKey() %7B%0A        return blobKey;%0A    %7D%0A%0A    public void setBlobKey(CBLBlobKey blobKey) %7B%0A        this.blobKey = blobKey;%0A    %7D%0A%0A    public long getLength() %7B%0A        return length;%0A    %7D%0A%0A    public void setLength(long length) %7B%0A        this.length = length;%0A    %7D%0A%0A    public long getEncodedLength() %7B%0A        return encodedLength;%0A    %7D%0A%0A    public void setEncodedLength(long encodedLength) %7B%0A        this.encodedLength = encodedLength;%0A    %7D%0A%0A    public CBLAttachmentEncoding getEncoding() %7B%0A        return encoding;%0A    %7D%0A%0A    public void setEncoding(CBLAttachmentEncoding encoding) %7B%0A        this.encoding = encoding;%0A    %7D%0A%0A    public int getRevpos() %7B%0A        return revpos;%0A    %7D%0A%0A    public void setRevpos(int revpos) %7B%0A        this.revpos = revpos;%0A    %7D%0A%0A%0A%7D%0A%0A

Add CBLAttachmentInternal