public class InputSource extends Object implements Closeable
| Constructor and Description |
|---|
InputSource(InputStream byteStream,
String encoding)
Create a new input source backed by byteStream.
|
InputSource(Reader reader)
Create a new input source backed by a reader.
|
InputSource(String uri)
Create a new input source backed by a reader.
|
public InputSource(InputStream byteStream, String encoding) throws UnsupportedEncodingException
byteStream - the byte streamencoding - the encodingUnsupportedEncodingException - if the encoding is not supportedpublic InputSource(Reader reader)
reader - the readerpublic InputSource(String uri) throws MalformedURLException, IOException
uri - the uri to read fromIOException - in case of errorMalformedURLException - in case of errorpublic Reader getReader()
public String getURI()
public void setURI(String uri)
uri - the uripublic String getMedia()
public void setMedia(String media)
media - the mediapublic String getTitle()
public void setTitle(String title)
title - the titlepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2019. All rights reserved.