类javax.imageio.spi.ImageInputStreamSpi源码实例Demo

下面列出了怎么用javax.imageio.spi.ImageInputStreamSpi的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: dragonwell8_jdk   文件: NullStreamCheckTest.java
public static void main(String[] args) throws IOException,
                                              MalformedURLException {

    /* deregister ImageOutputStreamSpi so that we creatImageOutputStream
     * returns null while writing.
     */
    localRegistry.deregisterAll(ImageOutputStreamSpi.class);
    /* verify possible ImageIO.write() scenario's for null stream output
     * from createImageOutputStream() API in ImageIO class.
     */
    verifyFileWrite();
    verifyStreamWrite();

    /* deregister ImageInputStreamSpi so that we creatImageInputStream
     * returns null while reading.
     */
    localRegistry.deregisterAll(ImageInputStreamSpi.class);
    /* verify possible ImageIO.read() scenario's for null stream output
     * from createImageInputStream API in ImageIO class.
     */
    verifyFileRead();
    verifyStreamRead();
    verifyUrlRead();
}
 
源代码2 项目: TencentKona-8   文件: NullStreamCheckTest.java
public static void main(String[] args) throws IOException,
                                              MalformedURLException {

    /* deregister ImageOutputStreamSpi so that we creatImageOutputStream
     * returns null while writing.
     */
    localRegistry.deregisterAll(ImageOutputStreamSpi.class);
    /* verify possible ImageIO.write() scenario's for null stream output
     * from createImageOutputStream() API in ImageIO class.
     */
    verifyFileWrite();
    verifyStreamWrite();

    /* deregister ImageInputStreamSpi so that we creatImageInputStream
     * returns null while reading.
     */
    localRegistry.deregisterAll(ImageInputStreamSpi.class);
    /* verify possible ImageIO.read() scenario's for null stream output
     * from createImageInputStream API in ImageIO class.
     */
    verifyFileRead();
    verifyStreamRead();
    verifyUrlRead();
}
 
源代码3 项目: openjdk-jdk8u   文件: NullStreamCheckTest.java
public static void main(String[] args) throws IOException,
                                              MalformedURLException {

    /* deregister ImageOutputStreamSpi so that we creatImageOutputStream
     * returns null while writing.
     */
    localRegistry.deregisterAll(ImageOutputStreamSpi.class);
    /* verify possible ImageIO.write() scenario's for null stream output
     * from createImageOutputStream() API in ImageIO class.
     */
    verifyFileWrite();
    verifyStreamWrite();

    /* deregister ImageInputStreamSpi so that we creatImageInputStream
     * returns null while reading.
     */
    localRegistry.deregisterAll(ImageInputStreamSpi.class);
    /* verify possible ImageIO.read() scenario's for null stream output
     * from createImageInputStream API in ImageIO class.
     */
    verifyFileRead();
    verifyStreamRead();
    verifyUrlRead();
}
 
源代码4 项目: openjdk-jdk9   文件: NullStreamCheckTest.java
public static void main(String[] args) throws IOException,
                                              MalformedURLException {

    /* deregister ImageOutputStreamSpi so that we creatImageOutputStream
     * returns null while writing.
     */
    localRegistry.deregisterAll(ImageOutputStreamSpi.class);
    /* verify possible ImageIO.write() scenario's for null stream output
     * from createImageOutputStream() API in ImageIO class.
     */
    verifyFileWrite();
    verifyStreamWrite();

    /* deregister ImageInputStreamSpi so that we creatImageInputStream
     * returns null while reading.
     */
    localRegistry.deregisterAll(ImageInputStreamSpi.class);
    /* verify possible ImageIO.read() scenario's for null stream output
     * from createImageInputStream API in ImageIO class.
     */
    verifyFileRead();
    verifyStreamRead();
    verifyUrlRead();
}
 
源代码5 项目: jdk8u_jdk   文件: NullStreamCheckTest.java
public static void main(String[] args) throws IOException,
                                              MalformedURLException {

    /* deregister ImageOutputStreamSpi so that we creatImageOutputStream
     * returns null while writing.
     */
    localRegistry.deregisterAll(ImageOutputStreamSpi.class);
    /* verify possible ImageIO.write() scenario's for null stream output
     * from createImageOutputStream() API in ImageIO class.
     */
    verifyFileWrite();
    verifyStreamWrite();

    /* deregister ImageInputStreamSpi so that we creatImageInputStream
     * returns null while reading.
     */
    localRegistry.deregisterAll(ImageInputStreamSpi.class);
    /* verify possible ImageIO.read() scenario's for null stream output
     * from createImageInputStream API in ImageIO class.
     */
    verifyFileRead();
    verifyStreamRead();
    verifyUrlRead();
}
 
源代码6 项目: openjdk-jdk9   文件: ServiceRegistrySyncTest.java
public static void main(String[] args) throws InterruptedException {

        final ArrayList<Class<?>> services = new ArrayList<Class<?>>();
        services.add(ImageInputStreamSpi.class);

        final ServiceRegistry reg = new ServiceRegistry(services.iterator());

        //create new thread for Registerer and Consumer Class
        Thread registerer = new Thread(new Registerer(reg));
        Thread consumer = new Thread(new Consumer(reg));

        //run both registerer and consumer thread parallely
        registerer.start();
        consumer.start();
    }
 
源代码7 项目: openjdk-jdk9   文件: ServiceRegistrySyncTest.java
@Override
public void run() {
    start = System.currentTimeMillis();
    end = start + duration;
    while (start < end) {
        //access the ServiceProvider API
        reg.getServiceProviders(ImageInputStreamSpi.class, true);
        start = System.currentTimeMillis();
    }
}
 
 类所在包
 同包方法