mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-05-01 00:00:02 -04:00
New SPI info.
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
package com.twelvemonkeys.imageio.plugins.dcx;
|
||||
|
||||
import com.twelvemonkeys.imageio.spi.ReaderWriterProviderInfo;
|
||||
|
||||
/**
|
||||
* DCXProviderInfo.
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @author last modified by $Author: harald.kuhr$
|
||||
* @version $Id: DCXProviderInfo.java,v 1.0 20/03/15 harald.kuhr Exp$
|
||||
*/
|
||||
final class DCXProviderInfo extends ReaderWriterProviderInfo {
|
||||
protected DCXProviderInfo() {
|
||||
super(
|
||||
DCXProviderInfo.class,
|
||||
new String[]{
|
||||
"dcx",
|
||||
"DCX"
|
||||
},
|
||||
new String[]{"dcx"},
|
||||
new String[]{
|
||||
// No official IANA record exists
|
||||
"image/dcx",
|
||||
"image/x-dcx",
|
||||
},
|
||||
"com.twelvemkonkeys.imageio.plugins.dcx.DCXImageReader",
|
||||
new String[] {"com.twelvemkonkeys.imageio.plugins.dcx.DCXImageReaderSpi"},
|
||||
null, null,
|
||||
false, null, null, null, null,
|
||||
true, null, null, null, null
|
||||
);
|
||||
}
|
||||
}
|
||||
+3
-31
@@ -28,48 +28,20 @@
|
||||
|
||||
package com.twelvemonkeys.imageio.plugins.pcx;
|
||||
|
||||
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 PCXImageReaderSpi extends ImageReaderSpi {
|
||||
public final class PCXImageReaderSpi extends ImageReaderSpiBase {
|
||||
|
||||
/**
|
||||
* Creates a {@code PCXImageReaderSpi}.
|
||||
*/
|
||||
public PCXImageReaderSpi() {
|
||||
this(IIOUtil.getProviderInfo(PCXImageReaderSpi.class));
|
||||
}
|
||||
|
||||
private PCXImageReaderSpi(final ProviderInfo providerInfo) {
|
||||
super(
|
||||
providerInfo.getVendorName(),
|
||||
providerInfo.getVersion(),
|
||||
new String[]{
|
||||
"pcx",
|
||||
"PCX"
|
||||
},
|
||||
new String[]{"pcx"},
|
||||
new String[]{
|
||||
// No official IANA record exists
|
||||
"image/pcx",
|
||||
"image/x-pcx",
|
||||
},
|
||||
"com.twelvemkonkeys.imageio.plugins.pcx.PCXImageReader",
|
||||
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 PCXProviderInfo());
|
||||
}
|
||||
|
||||
@Override public boolean canDecodeInput(final Object source) throws IOException {
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.twelvemonkeys.imageio.plugins.pcx;
|
||||
|
||||
import com.twelvemonkeys.imageio.spi.ReaderWriterProviderInfo;
|
||||
|
||||
/**
|
||||
* PCXProviderInfo.
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @author last modified by $Author: harald.kuhr$
|
||||
* @version $Id: PCXProviderInfo.java,v 1.0 20/03/15 harald.kuhr Exp$
|
||||
*/
|
||||
final class PCXProviderInfo extends ReaderWriterProviderInfo {
|
||||
protected PCXProviderInfo() {
|
||||
super(
|
||||
PCXProviderInfo.class,
|
||||
new String[]{
|
||||
"pcx",
|
||||
"PCX"
|
||||
},
|
||||
new String[]{"pcx"},
|
||||
new String[]{
|
||||
// No official IANA record exists
|
||||
"image/pcx",
|
||||
"image/x-pcx",
|
||||
},
|
||||
"com.twelvemkonkeys.imageio.plugins.pcx.PCXImageReader",
|
||||
new String[] {"com.twelvemkonkeys.imageio.plugins.pcx.PCXImageReaderSpi"},
|
||||
null, null,
|
||||
false, null, null, null, null,
|
||||
true, null, null, null, null
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user