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

📄 findsection.java

📁 这是用java编写的加密与解密程序
💻 JAVA
字号:


import java.io.*;



public class FindSection 
{
	
	public int section = 0;
	public int endsec = 0;
	public FindSection(String path)
	{
		try
		{
			DataInputStream in = new DataInputStream(new BufferedInputStream((new FileInputStream(path))));
			BufferedReader bf = new BufferedReader(new InputStreamReader(in));
			
			
//			String dd = bf.readLine();
			
			
			int secNo = 0;
			int pos = 0;
			String ss = "";
			
			
			
			
			while(!(ss.equals("EOF")))
			{
				ss = bf.readLine();
				pos++;
				
				if(ss.equals("SECTION"))
				{
					secNo++;
				}
				if(secNo == 5)
				{
					section = pos;
					
					while(!ss.equals("ENDSEC"))
					{
						ss = bf.readLine();
						pos++;
					}
					
					endsec = pos;
					ss = "EOF";
				}
			}
		}
		catch(IOException e)
		{
			System.out.print(e);
		}
	}
	
	
}

⌨️ 快捷键说明

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