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

smime.MemStreamSource Maven / Gradle / Ivy

The newest version!
package smime;

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

public final class MemStreamSource implements InputStreamSource {

    private final String name;
    private final byte[] data;

    public MemStreamSource(String name, byte[] data) {
        this.name = name;
        this.data = data;
    }

    public InputStream open() {
        return new ByteArrayInputStream(data);
    }

    public String getName() {
        return name;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy