Package com.thoughtworks.xstream.io

Examples of com.thoughtworks.xstream.io.StreamException


    public HierarchicalStreamReader createReader(final URL in) {
        try {
            final Document document = builder.build(in.toExternalForm());
            return new XomReader(document, getNameCoder());
        } catch (final ValidityException e) {
            throw new StreamException(e);
        } catch (final ParsingException e) {
            throw new StreamException(e);
        } catch (final IOException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here


    public HierarchicalStreamReader createReader(final File in) {
        try {
            final Document document = builder.build(in);
            return new XomReader(document, getNameCoder());
        } catch (final ValidityException e) {
            throw new StreamException(e);
        } catch (final ParsingException e) {
            throw new StreamException(e);
        } catch (final IOException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

        this.parser = parser;
        this.reader = reader;
        try {
            parser.setInput(this.reader);
        } catch (final XmlPullParserException e) {
            throw new StreamException(e);
        }
        moveDown();
    }
View Full Code Here

            parser = createParser();
            this.reader = reader;
            parser.setInput(this.reader);
            moveDown();
        } catch (final XmlPullParserException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

        } catch (final IllegalAccessException e) {
            exception = e;
        } catch (final ClassNotFoundException e) {
            exception = e;
        }
        throw new StreamException("Cannot create Xpp3 parser instance.", exception);
    }
View Full Code Here

                return COMMENT;
            default:
                return OTHER;
            }
        } catch (final XmlPullParserException e) {
            throw new StreamException(e);
        } catch (final IOException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

    @Override
    public void close() {
        try {
            reader.close();
        } catch (final IOException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

            elementStack.add(0, escapeXmlName(name));

            startTagInProgress = true;
            depth++;
        } catch (final SAXException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

    public void addAttribute(final String name, final String value) {
        if (startTagInProgress) {
            final String escapedName = escapeXmlName(name);
            attributeList.addAttribute("", escapedName, escapedName, "CDATA", value);
        } else {
            throw new StreamException(new IllegalStateException("No startElement being processed"));
        }
    }
View Full Code Here

            }
            text.getChars(0, lg, buffer, 0);

            contentHandler.characters(buffer, 0, lg);
        } catch (final SAXException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.thoughtworks.xstream.io.StreamException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.