导航菜单

页面标题

页面副标题

漫天星 v3.0.2 - md.java 源代码

正在查看: 漫天星 v3.0.2 应用的 md.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.mtx;

import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;

public class mD extends InputStream {
    public final ByteBuffer a;
    public int b = -1;

    public mD(ByteBuffer byteBuffer) {
        this.a = byteBuffer;
    }

    @Override
    public int available() {
        return this.a.remaining();
    }

    @Override
    public synchronized void mark(int i) {
        this.b = this.a.position();
    }

    @Override
    public boolean markSupported() {
        return true;
    }

    @Override
    public int read() {
        if (this.a.hasRemaining()) {
            return this.a.get() & 255;
        }
        return -1;
    }

    @Override
    public int read(byte[] bArr, int i, int i2) {
        if (!this.a.hasRemaining()) {
            return -1;
        }
        int min = Math.min(i2, available());
        this.a.get(bArr, i, min);
        return min;
    }

    @Override
    public synchronized void reset() {
        if (this.b == -1) {
            throw new IOException("Cannot reset to unset mark position");
        }
        this.a.position(this.b);
    }

    @Override
    public long skip(long j) {
        if (!this.a.hasRemaining()) {
            return -1L;
        }
        long min = Math.min(j, available());
        this.a.position((int) (r0.position() + min));
        return min;
    }
}