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

📄 readrow.java

📁 我自己做的一个关于使用Ethereal抓包软件抓取SIP协议包后自己的协议分析软件
💻 JAVA
字号:
/*
 * Readrow.java
 *
 * Created on 2007年5月23日, 下午1:43
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package SIPRead;


import java.io.*;
import java.util.*;
/**
 *
 * @author Administrator
 */
public class Readrow {
    
    private  int data = 0;
    private RandomAccessFile indata;
    
    /**
     * Creates a new instance of Readrow
     */
    public Readrow(File file) {
        try{
        indata = new RandomAccessFile(file,"r");
        }
        catch(IOException e){
            System.out.println(e);
        }
    }
    
    /*获取一行数据*/
    public String Next(){
        int a = 0;
        String temp= null;
        try{
        if((a  = indata.read())!=-1){
             indata.seek(indata.getFilePointer()-1);
             temp = indata.readLine();
        }
        else{
            temp = "!q2w378$";
        }
        }
        catch(IOException e){
            System.out.println(e);
        }
        return temp;
    }
    
}

⌨️ 快捷键说明

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