1 7 10 package javax.xml.crypto; 11 12 import java.io.InputStream ; 13 14 19 public class OctetStreamData implements Data { 20 21 private InputStream octetStream; 22 private String uri; 23 private String mimeType; 24 25 32 public OctetStreamData(InputStream octetStream) { 33 if (octetStream == null) { 34 throw new NullPointerException ("octetStream is null"); 35 } 36 this.octetStream = octetStream; 37 } 38 39 50 public OctetStreamData(InputStream octetStream, String uri, 51 String mimeType) { 52 if (octetStream == null) { 53 throw new NullPointerException ("octetStream is null"); 54 } 55 this.octetStream = octetStream; 56 this.uri = uri; 57 this.mimeType = mimeType; 58 } 59 60 65 public InputStream getOctetStream() { 66 return octetStream; 67 } 68 69 75 public String getURI() { 76 return uri; 77 } 78 79 85 public String getMimeType() { 86 return mimeType; 87 } 88 } 89 | Popular Tags |