Package com.itextpdf.xmp

Examples of com.itextpdf.xmp.XMPException


   */
  public static void assertPropName(String propName) throws XMPException
  {
    if (propName == null  ||  propName.length() == 0)
    {
      throw new XMPException("Empty property name", XMPError.BADPARAM);
    }
  }
View Full Code Here


   */
  public static void assertSchemaNS(String schemaNS) throws XMPException
  {
    if (schemaNS == null  ||  schemaNS.length() == 0)
    {
      throw new XMPException("Empty schema namespace URI", XMPError.BADPARAM);
    }
  }
View Full Code Here

   */
  public static void assertPrefix(String prefix) throws XMPException
  {
    if (prefix == null  ||  prefix.length() == 0)
    {
      throw new XMPException("Empty prefix", XMPError.BADPARAM);
    }
  }
View Full Code Here

   */
  public static void assertSpecificLang(String specificLang) throws XMPException
  {
    if (specificLang == null  ||  specificLang.length() == 0)
    {
      throw new XMPException("Empty specific language", XMPError.BADPARAM);
    }
  }
View Full Code Here

   */
  public static void assertStructName(String structName) throws XMPException
  {
    if (structName == null  ||  structName.length() == 0)
    {
      throw new XMPException("Empty array name", XMPError.BADPARAM);
    }
  }
View Full Code Here

   */
  public static void assertNotNull(Object param) throws XMPException
  {
    if (param == null)
    {
      throw new XMPException("Parameter must not be null", XMPError.BADPARAM);
    }
    else if ((param instanceof String&&  ((String) param).length() == 0)
    {
      throw new XMPException("Parameter must not be null or empty", XMPError.BADPARAM);
    }
  }
View Full Code Here

   */
  public static void assertImplementation(XMPMeta xmp) throws XMPException
  {
    if (xmp == null)
    {
      throw new XMPException("Parameter must not be null",
          XMPError.BADPARAM);
    }
    else if (!(xmp instanceof XMPMetaImpl))
    {
      throw new XMPException("The XMPMeta-object is not compatible with this implementation",
          XMPError.BADPARAM);
    }
  }
View Full Code Here

        ByteBuffer buffer = new ByteBuffer(stream);
        return parseXmlFromBytebuffer(buffer, options);
      }
      catch (IOException e)
      {
        throw new XMPException("Error reading the XML-file",
            XMPError.BADSTREAM, e);
      }
    }
  }
View Full Code Here

            return parseInputSource(new InputSource(fixReader));
          }
          catch (UnsupportedEncodingException e1)
          {
            // can normally not happen as the encoding is provided by a util function
            throw new XMPException("Unsupported Encoding",
                XMPError.INTERNALFAILURE, e);
          }
        }
        source = new InputSource(buffer.getByteStream());
        return parseInputSource(source);
View Full Code Here

      builder.setErrorHandler(null);
      return builder.parse(source);
    }
    catch (SAXException e)
    {
      throw new XMPException("XML parsing failure", XMPError.BADXML, e);
    }
    catch (ParserConfigurationException e)
    {
      throw new XMPException("XML Parser not correctly configured",
          XMPError.UNKNOWN, e);
    }
    catch (IOException e)
    {
      throw new XMPException("Error reading the XML-file", XMPError.BADSTREAM, e);
    }
  }
View Full Code Here

TOP

Related Classes of com.itextpdf.xmp.XMPException

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.