Java 8 FileCacheImageOutputStream - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 FileCacheImageOutputStream class.

This code example shows how to use the following methods:
		} 
	} 
 
	private ImageOutputStream createImageOutputStream(OutputStream os) throws IOException {
		if (this.cacheDir != null) {
			return new FileCacheImageOutputStream(os, this.cacheDir);
		} 
		else { 
			return new MemoryCacheImageOutputStream(os);
		} 
	} 
 
 
	/** 
	 * Template method that allows for manipulating the {@link ImageReadParam} 
	 * before it is used to read an image. 
	 * <p>The default implementation is empty. 
	 */ 
	protected void process(ImageReadParam irp) {
	} 
6
CodeRank
This code example shows how to use the following methods:
 
    @Override 
    public ImageOutputStream createOutputStreamInstance(Object output, boolean useCache, File cacheDir) throws IOException { 
        if (output instanceof OutputStream) { 
            if (useCache) { 
                return new FileCacheImageOutputStream((OutputStream) output, cacheDir); 
            } else { 
                return new MemoryCacheImageOutputStream((OutputStream) output); 
            } 
        } 
        throw new IllegalArgumentException("Output is not an instance of OutputStream"); 
    } 
 
    @Override 
    public String getDescription(Locale locale) { 
        return "Output Stream IOS Spi"; 
    } 
 
    @Override 
    public boolean canUseCacheFile() { 
4
CodeRank
This code example shows how to use the following methods:
		} 
	} 
 
	private ImageOutputStream createImageOutputStream(OutputStream os) throws IOException {
		if (this.cacheDir != null) {
			return new FileCacheImageOutputStream(os, this.cacheDir);
		} 
		else { 
			return new MemoryCacheImageOutputStream(os);
		} 
	} 
 
 
	/** 
	 * Template method that allows for manipulating the {@link ImageReadParam} before it is used to read an image. 
	 * <p>Default implementation is empty. 
	 */ 
	protected void process(ImageReadParam irp) {
	} 
 
4
CodeRank
See Code Examples for Java 8 FileCacheImageOutputStream Methods: