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


Java ImageOutputStream.getStreamPosition方法代码示例

本文整理汇总了Java中javax.imageio.stream.ImageOutputStream.getStreamPosition方法的典型用法代码示例。如果您正苦于以下问题:Java ImageOutputStream.getStreamPosition方法的具体用法?Java ImageOutputStream.getStreamPosition怎么用?Java ImageOutputStream.getStreamPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.imageio.stream.ImageOutputStream的用法示例。


在下文中一共展示了ImageOutputStream.getStreamPosition方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: verify

import javax.imageio.stream.ImageOutputStream; //导入方法依赖的package包/类
private static void verify(ImageOutputStream ios,
                           long expstreampos, int expbitoffset)
    throws IOException, RuntimeException
{
    long actstreampos = ios.getStreamPosition();
    int actbitoffset = ios.getBitOffset();

    if ((actstreampos != expstreampos) ||
        (actbitoffset != expbitoffset))
    {
        System.err.println("Expected stream position: " + expstreampos +
                           " Actual: " + actstreampos);
        System.err.println("Expected bit offset: " + expbitoffset +
                           " Actual: " + actbitoffset);
        throw new RuntimeException("Test failed.");
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:WriteBitsTest.java

示例2: ChunkStream

import javax.imageio.stream.ImageOutputStream; //导入方法依赖的package包/类
public ChunkStream(int type, ImageOutputStream stream) throws IOException {
    this.stream = stream;
    this.startPos = stream.getStreamPosition();

    stream.writeInt(-1); // length, will backpatch
    writeInt(type);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:PNGImageWriter.java

示例3: ChunkStream

import javax.imageio.stream.ImageOutputStream; //导入方法依赖的package包/类
ChunkStream(int type, ImageOutputStream stream) throws IOException {
    this.stream = stream;
    this.startPos = stream.getStreamPosition();

    stream.writeInt(-1); // length, will backpatch
    writeInt(type);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:PNGImageWriter.java

示例4: AVIOutputStream

import javax.imageio.stream.ImageOutputStream; //导入方法依赖的package包/类
/**
 * Creates a new AVI output stream with the specified video format and
 * framerate.
 * 
 * @param out
 *            the underlying output stream
 * @param format
 *            Selects an encoder for the video format.
 * @exception IllegalArgumentException
 *                if videoFormat is null or if framerate is <= 0
 */
public AVIOutputStream(ImageOutputStream out, VideoFormat format)
		throws IOException {
	if (format == null) {
		throw new IllegalArgumentException("format must not be null");
	}
	this.out = out;
	this.streamOffset = out.getStreamPosition();
	this.videoFormat = format;
	this.videoFrames = new LinkedList<Sample>();
}
 
开发者ID:SensorsINI,项目名称:jaer,代码行数:22,代码来源:AVIOutputStream.java


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