Tabnine Logo
ImageOutputStreamSpi
Code IndexAdd Tabnine to your IDE (free)

How to use
ImageOutputStreamSpi
in
javax.imageio.spi

Best Java code snippets using javax.imageio.spi.ImageOutputStreamSpi (Showing top 4 results out of 315)

origin: stackoverflow.com

 java.io.FileNotFoundException: \\ABC\abc.png (The network path was not found)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:233)
at javax.imageio.stream.FileImageOutputStream.<init>(FileImageOutputStream.java:69)
at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(FileImageOutputStreamSpi.java:55)
at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:419)
at javax.imageio.ImageIO.write(ImageIO.java:1530)
at javaapplication145.JavaApplication145.main(JavaApplication145.java:24)
Exception in thread "main" java.lang.NullPointerException
at javax.imageio.ImageIO.write(ImageIO.java:1538)
at javaapplication145.JavaApplication145.main(JavaApplication145.java:24)
origin: MKLab-ITI/multimedia-indexing

if (spi.getOutputClass().isInstance(output)) {
  try {
    return spi.createOutputStreamInstance(output, usecache, getCacheDirectory());
  } catch (IOException e) {
    throw new IIOException("Can't create cache file!", e);
origin: geosolutions-it/imageio-ext

/**
 * Upon registration, this method ensures that this SPI will be invoked
 * before the default FileImageOutputStreamSpi
 * 
 * @param registry
 *                ServiceRegistry where this object has been registered.
 * @param category
 *                a Class object indicating the registry category under
 *                which this object has been registered.
 */
@SuppressWarnings("unchecked")
public void onRegistration(ServiceRegistry registry, Class category) {
  super.onRegistration(registry, category);
  Object other;
  final Class targetClass = ImageOutputStreamSpi.class;
  for (Iterator i = registry.getServiceProviders(targetClass, true); i.hasNext();) {
    other = i.next();
    // using class name to avoid warnings in JDK 11
    if (other != null && other.getClass().getName().equals("com.sun.imageio.spi.FileImageOutputStreamSpi"))
      registry.deregisterServiceProvider(other);
    if (this != other) {
      registry.setOrdering(targetClass, this, other);
    }
  }
}
origin: it.geosolutions.imageio-ext/imageio-ext-customstreams

/**
 * Upon registration, this method ensures that this SPI will be invoked
 * before the default FileImageOutputStreamSpi
 * 
 * @param registry
 *                ServiceRegistry where this object has been registered.
 * @param category
 *                a Class object indicating the registry category under
 *                which this object has been registered.
 */
@SuppressWarnings("unchecked")
public void onRegistration(ServiceRegistry registry, Class category) {
  super.onRegistration(registry, category);
  Object other;
  final Class targetClass = ImageOutputStreamSpi.class;
  for (Iterator i = registry.getServiceProviders(targetClass, true); i.hasNext();) {
    other = i.next();
    if (other instanceof FileImageOutputStreamSpi)
      registry.deregisterServiceProvider(other);
    if (this != other) {
      registry.setOrdering(targetClass, this, other);
    }
  }
}
javax.imageio.spiImageOutputStreamSpi

Most used methods

  • createOutputStreamInstance
  • onRegistration
  • getOutputClass

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • From CI to AI: The AI layer in your organization
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