Package org.staxnav

Examples of org.staxnav.StaxNavException


      return new StaxNavException(navigator.getLocation(), "Element '" + navigator.getLocalName() + "' is out of sequence.");
   }

   public static StaxNavException contentRequired(StaxNavigator navigator)
   {
      return new StaxNavException(navigator.getLocation(), "Content for element '" + navigator.getLocalName() + "' is required.");
   }
View Full Code Here


      return new StaxNavException(navigator.getLocation(), "Content for element '" + navigator.getLocalName() + "' is required.");
   }

   public static StaxNavException invalidParent(StaxNavigator navigator)
   {
      return new StaxNavException(navigator.getLocation(), "Invalid parent for element '" + navigator.getLocalName() + "'");
   }
View Full Code Here

      return new StaxNavException(navigator.getLocation(), "Invalid parent for element '" + navigator.getLocalName() + "'");
   }

   public static StaxNavException unexpectedEndOfFile(StaxNavigator navigator)
   {
      return new StaxNavException(navigator.getLocation(), "Unexpected end of file.");
   }
View Full Code Here

               {
                  reader = factory.createXMLStreamReader((InputStream) input, inputEncoding);
               }
               catch (XMLStreamException e)
               {
                  throw new StaxNavException(e);
               }
            }
            else
            {
               try
               {
                  reader = factory.createXMLStreamReader((InputStream) input);
               }
               catch (XMLStreamException e)
               {
                  throw new StaxNavException(null, "Exception creating XMLStreamReader with inputStream: " + input, e);
               }
            }
         }
         else if (input instanceof Reader)
         {
            try
            {
               reader = factory.createXMLStreamReader((Reader) input);
            }
            catch (XMLStreamException e)
            {
               throw new StaxNavException(null, "Exception creating XMLStreamReader with reader: " + input, e);
            }
         }
         else if (input instanceof Source)
         {
            try
            {
               reader = factory.createXMLStreamReader((Source) input);
            }
            catch (XMLStreamException e)
            {
               throw new StaxNavException(null, "Exception creating XMLStreamReader with Source: " + input, e);
            }
         }
         else
         {
            throw new IllegalStateException("Unknown input: " + input); // should never happen...
View Full Code Here

               {
                  writer = factory.createXMLStreamWriter((OutputStream) output, outputEncoding);
               }
               catch (XMLStreamException e)
               {
                  throw new StaxNavException(e);
               }
            }
            else
            {
               try
               {
                  writer = factory.createXMLStreamWriter((OutputStream) output);
               }
               catch (XMLStreamException e)
               {
                  throw new StaxNavException(null, "Exception creating XMLStreamWriter with OutputStream: " + output, e);
               }
            }
         }
         else if (output instanceof Writer)
         {
            try
            {
               writer = factory.createXMLStreamWriter((Writer) output);
            }
            catch (XMLStreamException e)
            {
               throw new StaxNavException(null, "Exception creating XMLStreamWriter with Writer: " + output, e);
            }
         }
         else if (output instanceof Result)
         {
            try
            {
               writer = factory.createXMLStreamWriter((Result) output);
            }
            catch (XMLStreamException e)
            {
               throw new StaxNavException(null, "Exception creating XMLStreamWriter with Result: " + output, e);
            }
         }
         else
         {
            throw new IllegalStateException("Unknown output: " + output); // should never happen...
View Full Code Here

TOP

Related Classes of org.staxnav.StaxNavException

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.