smime.MemStreamSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smime-simple Show documentation
Show all versions of smime-simple Show documentation
Simple S/MIME library not dependent on Java Security
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;
}
}