Package com.lightcrafts.mediax.jai.util

Examples of com.lightcrafts.mediax.jai.util.ImagingException


             pb,
             nodeSupport.getRenderingHints());

        // Throw an exception if the rendering is null.
        if (instance == null) {
            throw new ImagingException(JaiI18N.getString("RemoteRenderedOp2"));
        }

  // Save the state of the node.
  RenderingHints rh = nodeSupport.getRenderingHints();
        oldHints = rh == null ? null : (RenderingHints)rh.clone();
View Full Code Here


  if (descriptor == null) {
      Object[] msgArg0 = {new String(protocolName)};
      MessageFormat formatter = new MessageFormat("");
      formatter.setLocale(Locale.getDefault());
      formatter.applyPattern(JaiI18N.getString("RemoteJAI16"));
      throw new ImagingException(formatter.format(msgArg0));
  }

  int count=0;
  int numRetries = getNumRetries();
  int retryInterval = getRetryInterval();

  Exception rieSave = null;
  while (count++ < numRetries) {
      try {
    serverCap = descriptor.getServerCapabilities(serverName);
    break;
      } catch (RemoteImagingException rie) {
    // Print that an Exception occured
    System.err.println(JaiI18N.getString("RemoteJAI24"));
    rieSave = rie;
    // Sleep for retryInterval milliseconds
    try {
        Thread.sleep(retryInterval);
    } catch (InterruptedException ie) {
//        throw new RuntimeException(ie.toString());
                    sendExceptionToListener(JaiI18N.getString("Generic5"),
                                            new ImagingException(JaiI18N.getString("Generic5"), ie));
    }
      }
  }

  if (serverCap == null && count > numRetries) {
View Full Code Here

   if (serverName == null) {
      try {
    serverName = InetAddress.getLocalHost().getHostAddress();
      } catch(Exception e) {
                sendExceptionToListener(JaiI18N.getString("JAIRMIDescriptor13"),
                                        new ImagingException(JaiI18N.getString("JAIRMIDescriptor13"), e));
//    throw new RuntimeException(e.getMessage());
      }
  }

  // Derive the service name.
View Full Code Here

        Method method = null;
        try {
            method = GRAPHICS2D_CLASS.getMethod(name, argTypes);
        } catch(Exception e) {
            String message = JaiI18N.getString("TiledGraphicsGraphics2") + name;
            sendExceptionToListener(message, new ImagingException(e));
//            throw new RuntimeException(e.getMessage());
        }

        // Queue the Method object and the Object[] argument array as an
        // ordered pair (Method, Object[]).
View Full Code Here

            try {
                method.invoke(g2d, args);
            } catch(Exception e) {
                String message = JaiI18N.getString("TiledGraphicsGraphics4") + method;
                sendExceptionToListener(message, new ImagingException(e));
//                e.printStackTrace();
//                throw new RuntimeException(e.getMessage());
            }
        }
    }
View Full Code Here

  } catch (IOException ioe) {
            ImagingListener listener =
                JAI.getDefaultInstance().getImagingListener();
            String message = JaiI18N.getString("OperationRegistry2");
            listener.errorOccurred(message,
                                   new ImagingException(message, ioe),
                                   OperationRegistry.class, false);
            return null;

//      ioe.printStackTrace();
//      throw new RuntimeException(
View Full Code Here

//    e.printStackTrace();
      }
  }

        if (savedOne != null)
            throw new ImagingException(JaiI18N.getString("OperationRegistry7")+
                                       " \""+descriptorName+"\"",
                                       savedOne);

  return null;
    }
View Full Code Here

            URL url = new URL(spec.toString());
            stream = url.openStream();
        } catch(Exception e) {
            String message =
                JaiI18N.getString("IIPResolution4") + spec.toString();
            listener.errorOccurred(message, new ImagingException(message, e),
                                   IIPResolutionOpImage.class, false);
//            throw new RuntimeException(e.getClass()+" "+e.getMessage());
        }

        return stream;
View Full Code Here

                charsAppended = true;
            }
        } catch(Exception e) {
            String message =
                JaiI18N.getString("IIPResolution5");
            listener.errorOccurred(message, new ImagingException(message, e),
                                   IIPResolutionOpImage.class, false);
//            throw new RuntimeException(e.getClass()+" "+e.getMessage());
        }

        return charsAppended ? buf.toString().toLowerCase() : null;
View Full Code Here

            try {
                stream.read(b);
            } catch(Exception e) {
                String message =
                    JaiI18N.getString("IIPResolution6");
                listener.errorOccurred(message, new ImagingException(message,e),
                                       IIPResolutionOpImage.class, false);
//                throw new RuntimeException(e.getClass()+" "+e.getMessage());
            }
            String msg = new String(b);
            if(throwException) {
View Full Code Here

TOP

Related Classes of com.lightcrafts.mediax.jai.util.ImagingException

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.