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

com.koushikdutta.async.http.body.StringPart Maven / Gradle / Ivy

package com.koushikdutta.async.http.body;

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

public class StringPart extends StreamPart {
    String value;
    public StringPart(String name, String value) {
        super(name, value.getBytes().length, null);
        this.value = value;
    }

    @Override
    protected InputStream getInputStream() throws IOException {
        return new ByteArrayInputStream(value.getBytes());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy