class NamespaceRemovingInputStream extends SdkFilterInputStream
Modifier and Type | Class and Description |
---|---|
private static class |
NamespaceRemovingInputStream.StringPrefixSlicer
Utility class to help test and remove specified prefixes from a string.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
hasRemovedNamespace
Set to true once the namespace has been removed
|
private byte[] |
lookAheadData
look ahead buffer
|
Constructor and Description |
---|
NamespaceRemovingInputStream(java.io.InputStream in)
Constructs a new NamespaceRemovingInputStream wrapping the specified
InputStream.
|
Modifier and Type | Method and Description |
---|---|
private int |
matchXmlNamespaceAttribute(java.lang.String s)
Checks if the string starts with a complete XML namespace attribute, and
if so, returns the number of characters that match.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
abort, abortIfNeeded, available, close, isMetricActivated, mark, markSupported, release, reset, skip
private byte[] lookAheadData
private boolean hasRemovedNamespace
public NamespaceRemovingInputStream(java.io.InputStream in)
in
- The InputStream containing an XML document whose XML namespace
is to be removed.public int read() throws java.io.IOException
read
in class SdkFilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class SdkFilterInputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
private int matchXmlNamespaceAttribute(java.lang.String s)
s
- The string to check for an XML namespace definition.