All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.bottomlessarchive.warc.service.content.domain.DefaultContentBlock Maven / Gradle / Ivy

package com.github.bottomlessarchive.warc.service.content.domain;

import java.io.InputStream;

/**
 * A simple implementation of a WarcContentBlock for Most of WARC-Types.
 *
 * @author Hadi Jooybar
 */
public class DefaultContentBlock implements WarcContentBlock {

    protected InputStream payload;

    /**
     * DefaultContentBlock constructor
     *
     * @param input Input stream for content block.
     */
    public DefaultContentBlock(final InputStream input) {
        payload = input;
    }

    /**
     * Return content block stream as payload
     *
     * @return payload stream
     */
    public InputStream getPayload() {
        return payload;
    }

    @Override
    public String toString() {
        return payload.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy