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


Java ExtDataInput类代码示例

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


ExtDataInput类属于brut.util包,在下文中一共展示了ExtDataInput类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: ARSCDecoder

import brut.util.ExtDataInput; //导入依赖的package包/类
private ARSCDecoder(InputStream arscStream, ResTable resTable, boolean storeFlagsOffsets, boolean keepBroken) {
    arscStream = mCountIn = new CountingInputStream(arscStream);
    if (storeFlagsOffsets) {
        mFlagsOffsets = new ArrayList<FlagsOffset>();
    } else {
        mFlagsOffsets = null;
    }
    mIn = new ExtDataInput(new LittleEndianDataInputStream(arscStream));
    mResTable = resTable;
    mKeepBroken = keepBroken;
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:12,代码来源:ARSCDecoder.java

示例4: 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

示例5: ARSCDecoder

import brut.util.ExtDataInput; //导入依赖的package包/类
private ARSCDecoder(InputStream arscStream, ResTable resTable,
		boolean storeFlagsOffsets, boolean keepBroken) {
	if (storeFlagsOffsets) {
		arscStream = mCountIn = new CountingInputStream(arscStream);
		mFlagsOffsets = new ArrayList<FlagsOffset>();
	} else {
		mCountIn = null;
		mFlagsOffsets = null;
	}
	mIn = new ExtDataInput(new LEDataInputStream(arscStream));
	mResTable = resTable;
	mKeepBroken = keepBroken;
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:14,代码来源:ARSCDecoder.java

示例6: 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

示例7: getNinePatch

import brut.util.ExtDataInput; //导入依赖的package包/类
private NinePatch getNinePatch(byte[] data) throws AndrolibException,
        IOException {
    ExtDataInput di = new ExtDataInput(new ByteArrayInputStream(data));
    find9patchChunk(di);
    return NinePatch.decode(di);
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:7,代码来源:Res9patchStreamDecoder.java

示例8: 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

示例9: open

import brut.util.ExtDataInput; //导入依赖的package包/类
public void open(InputStream stream) {
    close();
    if (stream != null) {
        m_reader = new ExtDataInput(new LittleEndianDataInputStream(stream));
    }
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:7,代码来源:AXmlResourceParser.java

示例10: getNinePatch

import brut.util.ExtDataInput; //导入依赖的package包/类
private NinePatch getNinePatch(byte[] data) throws AndrolibException,
		IOException {
	ExtDataInput di = new ExtDataInput(new ByteArrayInputStream(data));
	find9patchChunk(di);
	return NinePatch.decode(di);
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:7,代码来源:Res9patchStreamDecoder.java

示例11: open

import brut.util.ExtDataInput; //导入依赖的package包/类
public void open(InputStream stream) {
	close();
	if (stream != null) {
		m_reader = new ExtDataInput(new LEDataInputStream(stream));
	}
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:7,代码来源:AXmlResourceParser.java

示例12: getNinePatch

import brut.util.ExtDataInput; //导入依赖的package包/类
public static NinePatch getNinePatch(byte[] data) throws AndrolibException,
        IOException {
    ExtDataInput di = new ExtDataInput(new ByteArrayInputStream(data));
    find9patchChunk(di);
    return NinePatch.decode(di);
}
 
开发者ID:4455jkjh,项目名称:apktool-android,代码行数:7,代码来源:NinePatch.java


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