mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-10-04 11:26:44 -04:00
New SPI info.
This commit is contained in:
@@ -28,48 +28,20 @@
|
||||
|
||||
package com.twelvemonkeys.imageio.plugins.sgi;
|
||||
|
||||
import com.twelvemonkeys.imageio.spi.ProviderInfo;
|
||||
import com.twelvemonkeys.imageio.util.IIOUtil;
|
||||
import com.twelvemonkeys.imageio.spi.ImageReaderSpiBase;
|
||||
|
||||
import javax.imageio.ImageReader;
|
||||
import javax.imageio.spi.ImageReaderSpi;
|
||||
import javax.imageio.stream.ImageInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
|
||||
public final class SGIImageReaderSpi extends ImageReaderSpi {
|
||||
public final class SGIImageReaderSpi extends ImageReaderSpiBase {
|
||||
|
||||
/**
|
||||
* Creates a {@code SGIImageReaderSpi}.
|
||||
*/
|
||||
public SGIImageReaderSpi() {
|
||||
this(IIOUtil.getProviderInfo(SGIImageReaderSpi.class));
|
||||
}
|
||||
|
||||
private SGIImageReaderSpi(final ProviderInfo providerInfo) {
|
||||
super(
|
||||
providerInfo.getVendorName(),
|
||||
providerInfo.getVersion(),
|
||||
new String[]{
|
||||
"sgi",
|
||||
"SGI"
|
||||
},
|
||||
new String[]{"sgi"},
|
||||
new String[]{
|
||||
// No official IANA record exists
|
||||
"image/sgi",
|
||||
"image/x-sgi",
|
||||
},
|
||||
"com.twelvemkonkeys.imageio.plugins.sgi.SGIImageReader",
|
||||
new Class[] {ImageInputStream.class},
|
||||
null,
|
||||
true, // supports standard stream metadata
|
||||
null, null, // native stream format name and class
|
||||
null, null, // extra stream formats
|
||||
true, // supports standard image metadata
|
||||
null, null,
|
||||
null, null // extra image metadata formats
|
||||
);
|
||||
super(new SGIProviderInfo());
|
||||
}
|
||||
|
||||
@Override public boolean canDecodeInput(final Object source) throws IOException {
|
||||
|
@@ -0,0 +1,34 @@
|
||||
package com.twelvemonkeys.imageio.plugins.sgi;
|
||||
|
||||
import com.twelvemonkeys.imageio.spi.ReaderWriterProviderInfo;
|
||||
|
||||
/**
|
||||
* SGIProviderInfo.
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @author last modified by $Author: harald.kuhr$
|
||||
* @version $Id: SGIProviderInfo.java,v 1.0 20/03/15 harald.kuhr Exp$
|
||||
*/
|
||||
final class SGIProviderInfo extends ReaderWriterProviderInfo {
|
||||
protected SGIProviderInfo() {
|
||||
super(
|
||||
SGIProviderInfo.class,
|
||||
new String[] {
|
||||
"sgi",
|
||||
"SGI"
|
||||
},
|
||||
new String[] {"sgi"},
|
||||
new String[] {
|
||||
// No official IANA record exists
|
||||
"image/sgi",
|
||||
"image/x-sgi",
|
||||
},
|
||||
"com.twelvemkonkeys.imageio.plugins.sgi.SGIImageReader",
|
||||
new String[] {"com.twelvemonkeys.imageio.plugins.sgi.SGIImageReaderSpi"},
|
||||
null,
|
||||
null,
|
||||
false, null, null, null, null,
|
||||
true, null, null, null, null
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user