⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 videoframe.java

📁 一款J2ME浏览器
💻 JAVA
字号:
package com.lightspeedleader.browser;

import java.io.DataInputStream;
import javax.microedition.io.HttpConnection;
import javax.microedition.lcdui.Image;

public class VideoFrame {

    public int x;
    public int y;
    public HttpConnection conn;
    public DataInputStream dis;

    public VideoFrame() {
    }

    public void setXY(int i, int j) {
        x = i;
        y = j;
    }

    public void addStream(HttpConnection httpconnection, DataInputStream datainputstream) {
        conn = httpconnection;
        dis = datainputstream;
    }

    public Image getImage() {
        try {
            Image image;
            int i = dis.readUnsignedByte();
            int j = dis.readInt();
            byte abyte0[] = new byte[j];
            dis.readFully(abyte0);
            image = Image.createImage(abyte0, 0, j);
            return image;
        } catch (Exception exception) {
            return null;
        }
    }

    public void close() {
        try {
            dis.close();
            dis = null;
            conn.close();
            conn = null;
        }
        catch (Exception exception) {
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -