Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java
PREV | NEXT | SHOW LISTS | HIDE LISTS |

# Class com.ibm.xml.parser.Source

    java.lang.Object
        |
        +----com.ibm.xml.parser.Source

public class Source
extends java.lang.Object

Source is a data object that encapsulates whether a data source is byte-stream-oriented (InputStream) or character-stream-oriented (Reader).

Version:
  1.1
See Also:
  java.io.Inputstream, java.io.Reader

Constructor Summary
Source(java.io.InputStream inputStream) Constructor for byte-stream-oriented data.
Source(java.io.InputStream inputStream, java.lang.String encoding) Constructor for byte-stream-oriented data.
Source(java.io.Reader reader) Constructor for character-stream-oriented data.

Method Summary
java.lang.String | getEncoding() Returns the Java character encoding in use for the inputStream.
java.io.InputStream | getInputStream() Returns the byte-stream-oriented data source.
java.io.Reader | getReader() Returns the character-stream-oriented data source.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

### Source

    public Source(java.io.InputStream inputStream)

  Constructor for byte-stream-oriented data.
  Parameters:
    `inputStream` - Byte-stream-oriented data source.

### Source

    public Source(java.io.InputStream inputStream,
                  java.lang.String encoding)

  Constructor for byte-stream-oriented data.
  Parameters:
    `inputStream` - Byte-stream-oriented data source.
    `encoding` - Java character encoding to use, or null.
  See Also:
    getEncoding

### Source

    public Source(java.io.Reader reader)

  Constructor for character-stream-oriented data.
  Parameters:
    `reader` - Character-stream-oriented data source.

Method Detail

### getInputStream

    public java.io.InputStream getInputStream()

  Returns the byte-stream-oriented data source.
  Returns:
    Byte-stream-oriented data source.
  See Also:
    getReader

### getEncoding

    public java.lang.String getEncoding()

  Returns the Java character encoding in use for the inputStream. This value has no meaning when the source is character-stream-oriented.
  Returns:
    Java encoding in use by the byte-stream-oriented source, or null if not specified.

### getReader

    public java.io.Reader getReader()

  Returns the character-stream-oriented data source.
  Returns:
    Character-stream-oriented data source.
  See Also:
    getInputStream

Contents | Package | Class | Tree | Deprecated | Index | Help |
PREV | NEXT | SHOW LISTS | HIDE LISTS |