Package com.thoughtworks.xstream.io

Examples of com.thoughtworks.xstream.io.StreamException


            break;
        case Token.TYPE_START_NODE:
            depthState.setHasMoreChildren(true);
            break;
        default:
            throw new StreamException("Unexpected token " + nextToken);
        }
        pushBack(nextToken);
    }
View Full Code Here


                    return readToken(); // Next one please.
                default:
                    return token;
                }
            } catch (final IOException e) {
                throw new StreamException(e);
            }
        } else {
            final Token result = pushback;
            pushback = null;
            return result;
View Full Code Here

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

        }

        public String get(final long id) {
            final String result = map.get(Long.valueOf(id));
            if (result == null) {
                throw new StreamException("Unknown ID : " + id);
            } else {
                return result;
            }
        }
View Full Code Here

            case Token.TYPE_END_NODE:
                return new EndNode();
            case Token.TYPE_VALUE:
                return new Value();
            default:
                throw new StreamException("Unknown token type");
            }
        }
View Full Code Here

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

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

    private void write(final Token token) {
        try {
            tokenFormatter.write(out, token);
        } catch (final IOException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

    public HierarchicalStreamReader createReader(final Reader text) {
        try {
            final Document document = builder.build(text);
            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 InputStream 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

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.