Examples of StreamException


Examples of com.thoughtworks.xstream.io.StreamException

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

Examples of com.thoughtworks.xstream.io.StreamException

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

Examples of com.thoughtworks.xstream.io.StreamException

    @Override
    public HierarchicalStreamReader createReader(final Reader xml) {
        try {
            return createStaxReader(createParser(xml));
        } catch (final XMLStreamException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.StreamException

    @Override
    public HierarchicalStreamReader createReader(final InputStream in) {
        try {
            return createStaxReader(createParser(in));
        } catch (final XMLStreamException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.StreamException

                        // ignore
                    }
                }
            };
        } catch (final XMLStreamException e) {
            throw new StreamException(e);
        } catch (final IOException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.StreamException

                        // ignore
                    }
                }
            };
        } catch (final XMLStreamException e) {
            throw new StreamException(e);
        } catch (final FileNotFoundException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.StreamException

    @Override
    public HierarchicalStreamWriter createWriter(final Writer out) {
        try {
            return createStaxWriter(getOutputFactory().createXMLStreamWriter(out));
        } catch (final XMLStreamException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.StreamException

    @Override
    public HierarchicalStreamWriter createWriter(final OutputStream out) {
        try {
            return createStaxWriter(getOutputFactory().createXMLStreamWriter(out));
        } catch (final XMLStreamException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.StreamException

        if ("null@null".equals(key)) {
            return null;
        }
        final int idx = key.indexOf('@');
        if (idx < 0) {
            throw new StreamException("Not a valid key: " + key);
        }
        final Class<?> type = getMapper().realClass(key.substring(0, idx));
        final Converter converter = getConverterLookup().lookupConverterForType(type);
        if (converter instanceof SingleValueConverter) {
            final SingleValueConverter svConverter = (SingleValueConverter)converter;
            @SuppressWarnings("unchecked")
            final K k = (K)svConverter.fromString(key.substring(idx + 1));
            return k;
        } else {
            throw new StreamException("No SingleValueConverter for type " + type.getName() + " available");
        }
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.StreamException

        final Converter converter = getConverterLookup().lookupConverterForType(type);
        if (converter instanceof SingleValueConverter) {
            final SingleValueConverter svConverter = (SingleValueConverter)converter;
            return getMapper().serializedClass(type) + '@' + escape(svConverter.toString(key)) + ".xml";
        } else {
            throw new StreamException("No SingleValueConverter for type " + type.getName() + " available");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.