Package com.thoughtworks.xstream.io

Examples of com.thoughtworks.xstream.io.StreamException


  public HierarchicalStreamReader createReader(InputStream in) {
    try {
      return createReader(new InputStreamReader(in, "UTF-8"));
    } catch (UnsupportedEncodingException e) {
      throw new StreamException(e);
    }
  }
View Full Code Here


  public HierarchicalStreamWriter createWriter(OutputStream out) {
    try {
      return createWriter(new OutputStreamWriter(out, "UTF-8"));
    } catch (UnsupportedEncodingException e) {
      throw new StreamException(e);
    }
  }
View Full Code Here

                    secondPosition = i;
                }
            }
            if (firstPosition == -1 || secondPosition == -1) {
                // field not defined!!!
                throw new StreamException("You have not given XStream a list of all fields to be serialized.");
            }
            return firstPosition - secondPosition;
        }
View Full Code Here

        try {
            writer.write(buffer, 0, pointer);
            pointer = 0;
            writer.flush();
        } catch (final IOException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

        try {
            writer.write(buffer, 0, pointer);
            pointer = 0;
            writer.close();
        } catch (final IOException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

    private void raw(final char[] c) {
        try {
            writer.write(c);
            writer.flush();
        } catch (final IOException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

    private void raw(final char c) {
        try {
            writer.write(c);
            writer.flush();
        } catch (final IOException e) {
            throw new StreamException(e);
        }
    }
View Full Code Here

    @Override
    public HierarchicalStreamReader createReader(final Reader in) {
        try {
            return new XppReader(in, createParser(), getNameCoder());
        } catch (final XmlPullParserException e) {
            throw new StreamException("Cannot create XmlPullParser");
        }
    }
View Full Code Here

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

                source.setEncoding(encoding);
            }
            final Document document = documentBuilder.parse(source);
            return new DomReader(document, getNameCoder());
        } catch (final FactoryConfigurationError e) {
            throw new StreamException(e);
        } catch (final ParserConfigurationException e) {
            throw new StreamException(e);
        } catch (final SAXException 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.