congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TranscoderException
Code IndexAdd Tabnine to your IDE (free)

How to use
TranscoderException
in
org.apache.batik.transcoder

Best Java code snippets using org.apache.batik.transcoder.TranscoderException (Showing top 20 results out of 315)

origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Displays the specified error message using the <code>ErrorHandler</code>.
 */
public void displayError(String message) {
  try {
    SVGAbstractTranscoder.this.handler.error
      (new TranscoderException(message));
  } catch (TranscoderException ex) {
    throw new RuntimeException( ex.getMessage() );
  }
}
origin: haraldk/TwelveMonkeys

private static Throwable unwrapException(TranscoderException ex) {
  // The TranscoderException is generally useless...
  return ex.getException() != null ? ex.getException() : ex;
}
origin: haraldk/TwelveMonkeys

throw new TranscoderException(ex);
throw new TranscoderException(ex);
TranscoderException exception = new TranscoderException(ex.getMessage());
exception.initCause(ex);
throw exception;
origin: haraldk/TwelveMonkeys

exception = new TranscoderException(ex);
origin: haraldk/TwelveMonkeys

public int getWidth(int pIndex) throws IOException {
  checkBounds(pIndex);
  try {
    return rasterizer.getDefaultWidth();
  }
  catch (TranscoderException e) {
    throw new IIOException(e.getMessage(), e);
  }
}
origin: apache/batik

}catch(TranscoderException e){
  StringWriter trace = new StringWriter();
  e.printStackTrace(new PrintWriter(trace));
                new String[]{svgURL.toString(), 
                       e.getClass().getName(),
                       e.getMessage(),
                       trace.toString()
                })) });
origin: net.sf.taverna.t2.ui-components/graph-model

/**
 * Writes SVG to an output stream.
 * 
 * @param svgDocument
 *            the document to output
 * @param writer
 *            the stream to write the document to
 */
public static void writeSVG(SVGDocument svgDocument, Writer writer) {
  StringWriter sw = new StringWriter();
  try {
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    Node node = svgDocument.getDocumentElement();
    Source src = new DOMSource(node);
    Result dest = new StreamResult(sw);
    transformer.transform(src, dest);
    PrettyPrinter pp = new PrettyPrinter();
    pp.print(new StringReader(sw.toString()), writer);
  } catch (TransformerConfigurationException e) {
    e.printStackTrace(new PrintWriter(writer));
  } catch (TransformerException e) {
    e.printStackTrace(new PrintWriter(writer));
  } catch (TranscoderException e) {
    e.printStackTrace(new PrintWriter(writer));
  } catch (IOException e) {
    e.printStackTrace(new PrintWriter(writer));
  }
}
origin: deegree/deegree3

  svgCache.put( cp, img );
} catch ( TranscoderException e ) {
  LOG.warn( "Could not rasterize svg '{}': {}", g.imageURL, e.getLocalizedMessage() );
} catch ( IOException e ) {
  LOG.warn( "Could not rasterize svg '{}': {}", g.imageURL, e.getLocalizedMessage() );
origin: apache/batik

  /**
   * Creates a transcoder exception.
   */
  protected TranscoderException fatalError(String key, Object[] params)
    throws TranscoderException {
    TranscoderException result = new TranscoderException(key);
    errorHandler.fatalError(result);
    return result;
  }
}
origin: haraldk/TwelveMonkeys

public int getHeight(int pIndex) throws IOException {
  checkBounds(pIndex);
  try {
    return rasterizer.getDefaultHeight();
  }
  catch (TranscoderException e) {
    throw new IIOException(e.getMessage(), e);
  }
}
origin: com.twelvemonkeys.imageio/imageio-batik

throw new TranscoderException(ex);
throw new TranscoderException(ex);
TranscoderException exception = new TranscoderException(ex.getMessage());
exception.initCause(ex);
throw exception;
origin: ggp-org/ggp-base

ex.printStackTrace();
throw new IOException("Couldn't convert SVG");
origin: fr.avianey.apache-xmlgraphics/batik

  /**
   * Creates a transcoder exception.
   */
  protected TranscoderException fatalError(String key, Object[] params)
    throws TranscoderException {
    TranscoderException result = new TranscoderException(key);
    errorHandler.fatalError(result);
    return result;
  }
}
origin: apache/batik

/**
 * Displays the specified message using the <code>ErrorHandler</code>.
 */
public void displayMessage(String message) {
  try {
    SVGAbstractTranscoder.this.handler.warning
      (new TranscoderException(message));
  } catch (TranscoderException ex) {
    throw new RuntimeException( ex.getMessage() );
  }
}
origin: haraldk/TwelveMonkeys

private synchronized void init() throws IOException {
  // Need the extra test, to avoid throwing an IOException from the Transcoder
  if (imageInput == null) {
    throw new IllegalStateException("input == null");
  }
  if (reader == null) {
    WMFTranscoder transcoder = new WMFTranscoder();
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    Writer writer = new OutputStreamWriter(output, "UTF8");
    try {
      TranscoderInput in = new TranscoderInput(IIOUtil.createStreamAdapter(imageInput));
      TranscoderOutput out = new TranscoderOutput(writer);
      // TODO: Transcodinghints?
      transcoder.transcode(in, out);
    }
    catch (TranscoderException e) {
      throw new IIOException(e.getMessage(), e);
    }
    reader = new SVGImageReader(getOriginatingProvider());
    reader.setInput(ImageIO.createImageInputStream(new ByteArrayInputStream(output.toByteArray())));
  }
}
origin: net.sourceforge.ondex.apps/ovtk2

  e.printStackTrace();
} catch (TranscoderException e) {
  e.printStackTrace();
} catch (SVGGraphics2DIOException e) {
  e.printStackTrace();
origin: org.apache.cocoon/cocoon-batik-impl

/**
 * Receive notification of a successfully completed DOM tree generation.
 */
public void notify(Document doc) throws SAXException {
  
  try {
    TranscoderInput transInput = new TranscoderInput(doc);
    // Buffering is done by the pipeline (See shouldSetContentLength)
    TranscoderOutput transOutput = new TranscoderOutput(this.output);
    transcoder.transcode(transInput, transOutput);
  } catch (TranscoderException ex) {
    if (ex.getException() != null) {
      if (getLogger().isDebugEnabled()) {
        getLogger().debug("Got transcoder exception writing image, rethrowing nested exception", ex);
      }
      throw new SAXException("Exception writing image", ex.getException());
    }
    if (getLogger().isDebugEnabled()) {
      getLogger().debug("Got transcoder exception writing image, rethrowing", ex);
    }
    throw new SAXException("Exception writing image", ex);
  } catch (Exception ex) {
    if (getLogger().isDebugEnabled()) {
      getLogger().debug("Got exception writing image, rethrowing", ex);
    }
    throw new SAXException("Exception writing image", ex);
  }
}
origin: apache/fop

/**
 * Displays the specified error using the {@link ErrorHandler}.
 * @param e the exception to display
 */
public void displayError(Exception e) {
  try {
    getErrorHandler().error(new TranscoderException(e));
  } catch (TranscoderException ex) {
    throw new RuntimeException();
  }
}
origin: apache/batik

/**
 * Displays the specified error using the <code>ErrorHandler</code>.
 */
public void displayError(Exception e) {
  try {
    e.printStackTrace();
    SVGAbstractTranscoder.this.handler.error
      (new TranscoderException(e));
  } catch (TranscoderException ex) {
    throw new RuntimeException( ex.getMessage() );
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

  /**
   * Invoked when a warning occured while transcoding.
   * @param ex the warning informations encapsulated in a TranscoderException
   * @exception TranscoderException if the method want to forward
   * the exception
   */
  public void warning(TranscoderException ex) throws TranscoderException {
    System.err.println("WARNING: "+ex.getMessage());
  }
}
org.apache.batik.transcoderTranscoderException

Javadoc

Thrown when a transcoder is not able to transcode its input.

Most used methods

  • getMessage
    Returns the message of this exception. If an error message has been specified, returns that one. Oth
  • <init>
    Constructs a new transcoder exception with the specified detail message.
  • printStackTrace
  • getException
    Returns the original enclosed exception or null if any.
  • getLocalizedMessage
  • initCause
  • toString

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Permission (java.security)
    Legacy security code; do not use.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Join (org.hibernate.mapping)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now