1 12 package org.w3c.css.sac; 13 14 import java.io.InputStream ; 15 import java.io.Reader ; 16 17 38 public class InputSource { 39 40 private String uri; 41 private InputStream byteStream; 42 private String encoding; 43 private Reader characterStream; 44 private String title; 45 private String media; 46 47 55 public InputSource() { 56 } 57 58 69 public InputSource(String uri) { 70 setURI(uri); 71 } 72 73 86 public InputSource(Reader characterStream) { 87 setCharacterStream(characterStream); 88 } 89 90 111 public void setURI(String uri) { 112 this.uri = uri; 113 } 114 115 127 public String getURI() { 128 return uri; 129 } 130 131 147 public void setByteStream(InputStream byteStream) { 148 this.byteStream = byteStream; 149 } 150 151 161 public InputStream getByteStream() { 162 return byteStream; 163 } 164 165 180 public void setEncoding(String encoding) { 181 this.encoding = encoding; 182 } 183 184 192 public String getEncoding() { 193 return encoding; 194 } 195 196 207 public void setCharacterStream(Reader characterStream) { 208 this.characterStream = characterStream; 209 } 210 211 217 public Reader getCharacterStream() { 218 return characterStream; 219 } 220 221 228 public void setTitle(String title) { 229 this.title = title; 230 } 231 232 235 public String getTitle() { 236 return title; 237 } 238 239 243 public void setMedia(String media) { 244 this.media = media; 245 } 246 247 252 public String getMedia() { 253 if (media == null) { 254 return "all"; 255 } 256 return media; 257 } 258 } 259 | Popular Tags |