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


Java ExtDataInput.readInt方法代码示例

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


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

示例1: decode

import brut.util.ExtDataInput; //导入方法依赖的package包/类
public static NinePatch decode(ExtDataInput di) throws IOException {
    di.skipBytes(1);
    byte numXDivs = di.readByte();
    byte numYDivs = di.readByte();
    di.skipBytes(1);
    di.skipBytes(8);
    int padLeft = di.readInt();
    int padRight = di.readInt();
    int padTop = di.readInt();
    int padBottom = di.readInt();
    di.skipBytes(4);
    int[] xDivs = di.readIntArray(numXDivs);
    int[] yDivs = di.readIntArray(numYDivs);

    return new NinePatch(padLeft, padRight, padTop, padBottom, xDivs,
            yDivs);
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:18,代码来源:Res9patchStreamDecoder.java

示例2: decode

import brut.util.ExtDataInput; //导入方法依赖的package包/类
public static NinePatch decode(ExtDataInput di) throws IOException {
	di.skipBytes(1);
	byte numXDivs = di.readByte();
	byte numYDivs = di.readByte();
	di.skipBytes(1);
	di.skipBytes(8);
	int padLeft = di.readInt();
	int padRight = di.readInt();
	int padTop = di.readInt();
	int padBottom = di.readInt();
	di.skipBytes(4);
	int[] xDivs = di.readIntArray(numXDivs);
	int[] yDivs = di.readIntArray(numYDivs);

	return new NinePatch(padLeft, padRight, padTop, padBottom, xDivs,
			yDivs);
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:18,代码来源:Res9patchStreamDecoder.java

示例3: read

import brut.util.ExtDataInput; //导入方法依赖的package包/类
public static Header read(ExtDataInput in, CountingInputStream countIn) throws IOException {
    short type;
    int start = countIn.getCount();
    try {
        type = in.readShort();
    } catch (EOFException ex) {
        return new Header(TYPE_NONE, 0, 0, countIn.getCount());
    }
    return new Header(type, in.readShort(), in.readInt(), start);
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:11,代码来源:ARSCDecoder.java

示例4: read

import brut.util.ExtDataInput; //导入方法依赖的package包/类
public static Header read(ExtDataInput in) throws IOException {
	short type;
	try {
		type = in.readShort();
	} catch (EOFException ex) {
		return new Header(TYPE_NONE, 0);
	}
	in.skipBytes(2);
	return new Header(type, in.readInt());
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:11,代码来源:ARSCDecoder.java

示例5: read

import brut.util.ExtDataInput; //导入方法依赖的package包/类
/**
 * Reads whole (including chunk type) string block from stream. Stream must
 * be at the chunk type.
 */
public static StringBlock read(ExtDataInput reader) throws IOException {
    reader.skipCheckChunkTypeInt(CHUNK_STRINGPOOL_TYPE, CHUNK_NULL_TYPE);
    int chunkSize = reader.readInt();

    // ResStringPool_header
    int stringCount = reader.readInt();
    int styleCount = reader.readInt();
    int flags = reader.readInt();
    int stringsOffset = reader.readInt();
    int stylesOffset = reader.readInt();

    StringBlock block = new StringBlock();
    block.m_isUTF8 = (flags & UTF8_FLAG) != 0;
    block.m_stringOffsets = reader.readIntArray(stringCount);
    block.m_stringOwns = new int[stringCount];
    Arrays.fill(block.m_stringOwns, -1);

    if (styleCount != 0) {
        block.m_styleOffsets = reader.readIntArray(styleCount);
    }

    int size = ((stylesOffset == 0) ? chunkSize : stylesOffset) - stringsOffset;
    block.m_strings = new byte[size];
    reader.readFully(block.m_strings);

    if (stylesOffset != 0) {
        size = (chunkSize - stylesOffset);
        block.m_styles = reader.readIntArray(size / 4);

        // read remaining bytes
        int remaining = size % 4;
        if (remaining >= 1) {
            while (remaining-- > 0) {
                reader.readByte();
            }
        }
    }

    return block;
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:45,代码来源:StringBlock.java


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