package com.cloudant.sync.datastore;

/**
 * Created by tomblench on 28/04/2014.
 */

import java.io.IOException;
import java.io.InputStream;

/**
 * An Attachment which is read from a stream before saving to the database
 */
public class UnsavedStreamAttachment extends Attachment {

    public UnsavedStreamAttachment(InputStream stream, String name, String type) {
        this.stream = stream;
        this.name = name;
        this.type = type;
    }

    public InputStream getInputStream() throws IOException {
        return stream;
    }

    private InputStream stream;

}

@@ -1,8 +1,623 @@
+/**%0A * Copyright (c) 2014 Cloudant, Inc. All rights reserved.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may not use this file%0A * except in compliance with the License. You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software distributed under the%0A * License is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,%0A * either express or implied. See the License for the specific language governing permissions%0A * and limitations under the License.%0A */%0A%0A
 package 

Add licence header