当前位置: 首页>>代码示例>>Java>>正文


Java ByteSourceFile类代码示例

本文整理汇总了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;
        }
    }
}
 
开发者ID:nkiraly,项目名称:Java-FPDF,代码行数:24,代码来源:JpegReader.java

示例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;
        }
    }
}
 
开发者ID:lklong,项目名称:imageweb,代码行数:18,代码来源:CmykImageUtil.java

示例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;
            }
        }
    }
}
 
开发者ID:YAMJ,项目名称:yamj-v2,代码行数:18,代码来源:JpegReader.java

示例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);
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:13,代码来源:ImageParser.java

示例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);
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:9,代码来源:ImageParser.java

示例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));
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:9,代码来源:ImageParser.java

示例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);
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:12,代码来源:ImageParser.java

示例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));
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:12,代码来源:ImageParser.java

示例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));
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:8,代码来源:IccProfileParser.java

示例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));
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:8,代码来源:IccProfileParser.java

示例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);
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:13,代码来源:ImageParser.java

示例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);
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:9,代码来源:ImageParser.java

示例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));
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:9,代码来源:ImageParser.java

示例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));
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:9,代码来源:ImageParser.java

示例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);
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:9,代码来源:ImageParser.java


注:本文中的org.apache.sanselan.common.byteSources.ByteSourceFile类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。