/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.http.GenericHttpResponse
 *  com.l7tech.common.io.ByteLimitInputStream
 *  com.l7tech.common.mime.ContentTypeHeader
 *  com.l7tech.util.IOUtils
 */
package com.l7tech.server.url;

import com.l7tech.common.http.GenericHttpResponse;
import com.l7tech.common.io.ByteLimitInputStream;
import com.l7tech.common.mime.ContentTypeHeader;
import com.l7tech.server.url.AbstractUrlObjectCache;
import com.l7tech.server.url.HttpObjectCache;
import com.l7tech.util.IOUtils;
import java.io.IOException;
import java.io.InputStream;

class b
implements AbstractUrlObjectCache.UserObjectSource {
    final GenericHttpResponse val$sourceResponse;
    final int val$maxSize;

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    b(HttpObjectCache httpObjectCache, GenericHttpResponse genericHttpResponse, int n2) {
        this.val$sourceResponse = genericHttpResponse;
        this.val$maxSize = n2;
    }

    @Override
    public byte[] getBytes() throws IOException {
        return IOUtils.slurpStream((InputStream)new ByteLimitInputStream(this.val$sourceResponse.getInputStream(), 1024, (long)this.val$maxSize));
    }

    @Override
    public ContentTypeHeader getContentType() {
        return this.val$sourceResponse.getContentType();
    }

    @Override
    public String getString(boolean bl2) throws IOException {
        return this.val$sourceResponse.getAsString(bl2, this.val$maxSize);
    }
}

