本文整理汇总了Java中org.apache.sanselan.common.byteSources.ByteSourceFile类的典型用法代码示例。如果您正苦于以下问题:Java ByteSourceFile类的具体用法?Java ByteSourceFile怎么用?Java ByteSourceFile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ByteSourceFile类属于org.apache.sanselan.common.byteSources包,在下文中一共展示了ByteSourceFile类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkAdobeMarker
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
/**
* Check Adobe markers in File
* @param file
* @throws IOException
* @throws ImageReadException
*/
public void checkAdobeMarker(File file) throws IOException, ImageReadException {
JpegImageParser parser = new JpegImageParser();
ByteSource byteSource = new ByteSourceFile(file);
@SuppressWarnings("rawtypes")
ArrayList segments = parser.readSegments(byteSource, new int[] { 0xffee }, true);
if (segments != null && segments.size() >= 1) {
UnknownSegment app14Segment = (UnknownSegment) segments.get(0);
byte[] data = app14Segment.bytes;
if (data.length >= 12 && data[0] == 'A' && data[1] == 'd' && data[2] == 'o' && data[3] == 'b' && data[4] == 'e')
{
hasAdobeMarker = true;
int transform = app14Segment.bytes[11] & 0xff;
if (transform == 2)
colorType = COLOR_TYPE_YCCK;
}
}
}
示例2: checkAdobeMarker
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public static void checkAdobeMarker(File file) throws IOException, ImageReadException {
JpegImageParser parser = new JpegImageParser();
ByteSource byteSource = new ByteSourceFile(file);
@SuppressWarnings("rawtypes")
ArrayList segments = parser.readSegments(byteSource, new int[] { 0xffee }, true);
if (segments != null && segments.size() >= 1) {
UnknownSegment app14Segment = (UnknownSegment) segments.get(0);
byte[] data = app14Segment.bytes;
if (data.length >= 12 && data[0] == 'A' && data[1] == 'd' && data[2] == 'o' && data[3] == 'b' && data[4] == 'e')
{
hasAdobeMarker = true;
int transform = app14Segment.bytes[11] & 0xff;
if (transform == 2)
colorType = COLOR_TYPE_YCCK;
}
}
}
示例3: checkAdobeMarker
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
private void checkAdobeMarker(File file) throws IOException, ImageReadException {
JpegImageParser parser = new JpegImageParser();
ByteSource byteSource = new ByteSourceFile(file);
@SuppressWarnings("rawtypes")
List segments = parser.readSegments(byteSource, new int[]{0xffee}, true);
if (segments != null && !segments.isEmpty()) {
UnknownSegment app14Segment = (UnknownSegment) segments.get(0);
byte[] data = app14Segment.bytes;
if (data.length >= 12 && data[0] == 'A' && data[1] == 'd' && data[2] == 'o' && data[3] == 'b' && data[4] == 'e') {
hasAdobeMarker = Boolean.TRUE;
int transform = app14Segment.bytes[11] & 0xff;
if (transform == 2) {
colorType = COLOR_TYPE_YCCK;
}
}
}
}
示例4: getMetadata
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final IImageMetadata getMetadata(File file, Map params)
throws ImageReadException, IOException
{
if (debug)
System.out.println(getName() + ".getMetadata" + ": "
+ file.getName());
if (!canAcceptExtension(file))
return null;
return getMetadata(new ByteSourceFile(file), params);
}
示例5: getImageInfo
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final ImageInfo getImageInfo(File file, Map params)
throws ImageReadException, IOException
{
if (!canAcceptExtension(file))
return null;
return getImageInfo(new ByteSourceFile(file), params);
}
示例6: getFormatCompliance
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final FormatCompliance getFormatCompliance(File file)
throws ImageReadException, IOException
{
if (!canAcceptExtension(file))
return null;
return getFormatCompliance(new ByteSourceFile(file));
}
示例7: getICCProfileBytes
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final byte[] getICCProfileBytes(File file, Map params)
throws ImageReadException, IOException
{
if (!canAcceptExtension(file))
return null;
if (debug)
System.out.println(getName() + ": " + file.getName());
return getICCProfileBytes(new ByteSourceFile(file), params);
}
示例8: dumpImageFile
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final String dumpImageFile(File file) throws ImageReadException,
IOException
{
if (!canAcceptExtension(file))
return null;
if (debug)
System.out.println(getName() + ": " + file.getName());
return dumpImageFile(new ByteSourceFile(file));
}
示例9: getICCProfileInfo
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public IccProfileInfo getICCProfileInfo(File file)
{
if (file == null)
return null;
return getICCProfileInfo(new ByteSourceFile(file));
}
示例10: issRGB
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public Boolean issRGB(File file)
{
if (file == null)
return null;
return issRGB(new ByteSourceFile(file));
}
示例11: getMetadata
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final IImageMetadata getMetadata(File file, Map params)
throws ImageReadException, IOException
{
if (debug)
System.out.println(getName() + ".getMetadata" + ": "
+ file.getName());
if (!canAcceptExtension(file))
return null;
return getMetadata(new ByteSourceFile(file), params);
}
示例12: getImageInfo
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final ImageInfo getImageInfo(File file, Map params)
throws ImageReadException, IOException
{
if (!canAcceptExtension(file))
return null;
return getImageInfo(new ByteSourceFile(file), params);
}
示例13: getFormatCompliance
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final FormatCompliance getFormatCompliance(File file)
throws ImageReadException, IOException
{
if (!canAcceptExtension(file))
return null;
return getFormatCompliance(new ByteSourceFile(file));
}
示例14: getAllBufferedImages
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final ArrayList getAllBufferedImages(File file)
throws ImageReadException, IOException
{
if (!canAcceptExtension(file))
return null;
return getAllBufferedImages(new ByteSourceFile(file));
}
示例15: getBufferedImage
import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final BufferedImage getBufferedImage(File file, Map params)
throws ImageReadException, IOException
{
if (!canAcceptExtension(file))
return null;
return getBufferedImage(new ByteSourceFile(file), params);
}