DataBufferSourceHandler.java 875 Bytes
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.service.DataBuffer
 */
package com.adobe.aemfd.docmanager.internal.source;

import com.adobe.aemfd.docmanager.internal.io.DataBufferInputStream;
import com.adobe.aemfd.docmanager.source.AbstractSourceHandler;
import com.adobe.service.DataBuffer;
import java.io.IOException;
import java.io.InputStream;

public class DataBufferSourceHandler
extends AbstractSourceHandler {
    private DataBuffer dataBuffer;

    public DataBufferSourceHandler(DataBuffer dataBuffer, long length, String contentType) {
        super(length, contentType);
        this.dataBuffer = dataBuffer;
    }

    public InputStream getInputStream() throws IOException {
        return new DataBufferInputStream(this.dataBuffer);
    }

    protected void doDispose() {
        this.dataBuffer = null;
    }
}