亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rfbproto.java

?? 一個遠程登陸器的原代碼
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
			writeRfbFileTransferMsg(
									rfbCommand,
									rfbCFileDelete,
									0,
									temp.length(),
									temp);
		}
		catch (IOException e)
		{
			System.err.println(e);
		}
	}

	//Internally used.
	// Handles acknowledgement that the directory has been created on the server
	void createRemoteDirectoryFeedback() throws IOException
	{
		is.readInt();
		int length = is.readInt();
		String f="";
		for (int i = 0; i < length; i++)
		{
			f += (char)is.readUnsignedByte();
		}
		viewer.ftp.refreshRemoteLocation();	
		viewer.ftp.historyComboBox.insertItemAt(new String(" > Created Directory on Remote Machine: " + f.substring(0, f.length()-1)),0);
		viewer.ftp.historyComboBox.setSelectedIndex(0);
	}

	//Call this method to create a directory at server
	void createRemoteDirectory(String text)
	{
		try
		{
			String temp = text;
			writeRfbFileTransferMsg(
				rfbCommand,
				rfbCDirCreate,
				0,
				temp.length(),
				temp);
		}
		catch (IOException e)
		{
			System.err.println(e);
		}
	}

	//Call this method to get a file from the server
	void requestRemoteFile(String text, String localPath)
	{
		try
		{
			String temp = text;
			receivePath = localPath;
					
			writeRfbFileTransferMsg(
									rfbFileTransferRequest,
									0,
									1, // 0 : compression not supported - 1 : compression supported
									temp.length(),
									temp);
		}
		catch (IOException e)
		{
			System.err.println(e);
		}
	}

	//Internally used when transferring file from server. Here, the server sends
	//a rfb packet signalling that it is ready to send the file requested
	void receiveFileHeader() throws IOException
	{
		fFileReceptionRunning = true;
		fFileReceptionError = false;
		viewer.ftp.disableButtons();
		int size = is.readInt();
		int length = is.readInt();
		
		String tempName = "";
		for (int i = 0; i < length; i++)
		{
			tempName += (char) is.readUnsignedByte();
		}

		// sf@2004 - Read the high part of file size (not yet in rfbFileTransferMsg for 
		// backward compatibility reasons...)
		int sizeH = is.readInt();
		long lSize = ((long)(sizeH) << 32) + size;
		
		receiveFileSize = lSize;
		viewer.ftp.connectionStatus.setText("Received: 0 bytes of " + lSize + " bytes");
		fileSize=0;
		fileChunkCounter = 0;
		String fileName = receivePath;
		fos = new FileOutputStream(fileName);
		writeRfbFileTransferMsg(rfbFileHeader, 0, 0, 0, null);
	}

	//Internally used when transferring file from server. This method receives one chunk
	//of the file
	void receiveFileChunk() throws IOException
	{
		// sf@2004 - Size = 0 means file chunck not compressed
		int size = is.readInt();
		boolean fCompressed = (size != 0);
		int length = is.readInt();
		fileChunkCounter++;

		// sf@2004 - allocates buffers for file chunck reception and decompression 
		byte[] ReceptionBuffer = new byte[length + 32];

		// Read the incoming file data
		// Todo: check error !
		is.readFully(ReceptionBuffer,0, length);
		
		if (fCompressed)
		{
			int bufSize = sz_rfbBlockSize + 1024; // Todo: set a more accurate value here
			int decompressedSize = 0;
			byte[] DecompressionBuffer = new byte[bufSize];
			Inflater myInflater = new Inflater();
			myInflater.setInput(ReceptionBuffer);
			try
			{
				decompressedSize = myInflater.inflate(DecompressionBuffer);
			}
			catch (DataFormatException e)
			{
				System.err.println(e);
			}
			// Todo: check error !
			fos.write(DecompressionBuffer, 0, decompressedSize);
			fileSize += decompressedSize;
		}
		else
		{
			//	 Todo: check error !
			fos.write(ReceptionBuffer, 0, length);
			fileSize += length;
		}
		
		/*
		for (int i = 0; i < length; i++) 
		{
			fos.write(is.readUnsignedByte());
			fileSize++;
		}
		*/
		
		// viewer.ftp.connectionStatus.setText("Received: " + fileSize + " bytes of "+ receiveFileSize+ " bytes" );
		viewer.ftp.jProgressBar.setValue((int)((fileSize * 100) / receiveFileSize));
		viewer.ftp.connectionStatus.setText(">>> Receiving File: " + receivePath + " - Size: " + receiveFileSize + " bytes - Progress: " + ((fileSize * 100) / receiveFileSize) + "%");
		
		if (fAbort == true)
		{
			fAbort = false;
			fFileReceptionError = true;
			writeRfbFileTransferMsg(rfbAbortFileTransfer, 0, 0, 0, null);
			
		}
		// sf@2004 - For old FT protocole only
		/*
		if(fileChunkCounter==10)
		{
			writeRfbFileTransferMsg(rfbFileHeader,0,0,0,null);
			fileChunkCounter=0;
		}
		*/
	}
	
	//Internally used when transferring file from server. Server signals end of file.
	void endOfReceiveFile(boolean fReceptionOk) throws IOException
	{
		int size = is.readInt();
		int length = is.readInt();
		fileSize=0;
		fos.close();
		
		viewer.ftp.refreshLocalLocation();
		if (fReceptionOk && !fFileReceptionError)
		{
			viewer.ftp.connectionStatus.setText(" > File successfully received");
			viewer.ftp.historyComboBox.insertItemAt(new String(" > File: <" + receivePath + "> received from Remote Machine" ),0);
		}
		else
		{
			// sf@2004 - Delete the incomplete receieved file for now (until we use Delta Transfer)
			File f = new File(receivePath);
			f.delete();		
			viewer.ftp.connectionStatus.setText(" > Error - File NOT received");
			viewer.ftp.historyComboBox.insertItemAt(new String(" > Error - File: <" + receivePath + "> not correctly received from Remote Machine (aborted by user or error)") ,0);
		}

		fFileReceptionError = false;
		fFileReceptionRunning = false;
		viewer.ftp.historyComboBox.setSelectedIndex(0);
		viewer.ftp.enableButtons();
	}

	//Call this method to read the contents of the server directory
	void readServerDirectory(String text)
	{
		try
		{
			String temp = text;
			writeRfbFileTransferMsg(
									rfbDirContentRequest,
									rfbRDirContent,
									0,
									temp.length(),
									temp);
		}
		catch (IOException e)
		{
			System.err.println(e);
		}

	}

	//Internally used to receive list of drives available on the server
	void readFTPMsgDriveList() throws IOException
	{
		String str = "";
		for (int i = 0; i < 4; i++)
		{
			is.readUnsignedByte();
		}
		int length = is.readInt();
		for (int i = 0; i < length; i++)
		{
			char temp = (char) is.readUnsignedByte();
			if (temp != '\0')
			{
				str += temp;
			}
		}
		viewer.ftp.printDrives(str);
		
		// sf@2004
		// Finds the first readable drive and populates the local directory
		viewer.ftp.changeLocalDirectory(viewer.ftp.getFirstReadableLocalDrive());
		// Populate the remote directory
		viewer.ftp.changeRemoteDrive();
		viewer.ftp.refreshRemoteLocation();
		
	}

	//Internally used to receive directory content from server
	//Here, the server marks the start of the directory listing
	void readFTPMsgDirectoryList() throws IOException
	{
		is.readInt();
		int length = is.readInt();
		if (length == 0)
		{
			readFTPMsgDirectorydriveNotReady();
			inDirectory2 = false;
		}
		else
		{
			// sf@2004 - New FT protocole sends remote directory name
			String str = "";
			for (int i = 0; i < length; i++)
			{
				char temp = (char) is.readUnsignedByte();
				if (temp != '\0')
				{
					str += temp;
				}
			}
			// viewer.ftp.changeRemoteDirectory(str);
			
		}
	}

	//Internally used to receive directory content from server
	//Here, the server sends one file/directory with it's attributes
	void readFTPMsgDirectoryListContent() throws IOException
	{
		String fileName = "", alternateFileName = "";
		byte contentType = 0;
		int contentParamT = 0;
		int contentParam = 0;
		byte temp = 0;
		int dwFileAttributes,
			nFileSizeHigh,
			nFileSizeLow,
			dwReserved0,
			dwReserved1;
		long ftCreationTime, ftLastAccessTime, ftLastWriteTime;
		char cFileName, cAlternateFileName;
		int length = 0;
		is.readInt();
		length = is.readInt();
		dwFileAttributes = is.readInt();
		length -= 4;
		ftCreationTime = is.readLong();
		length -= 8;
		ftLastAccessTime = is.readLong();
		length -= 8;
		ftLastWriteTime = is.readLong();
		length -= 8;
		nFileSizeHigh = is.readInt();
		length -= 4;
		nFileSizeLow = is.readInt();
		length -= 4;
		dwReserved0 = is.readInt();
		length -= 4;
		dwReserved1 = is.readInt();
		length -= 4;
		cFileName = (char) is.readUnsignedByte();
		length--;
		while (cFileName != '\0')
		{
			fileName += cFileName;
			cFileName = (char) is.readUnsignedByte();
			length--;
		}
		cAlternateFileName = (char) is.readByte();
		length--;
		while (length != 0)
		{
			alternateFileName += cAlternateFileName;
			cAlternateFileName = (char) is.readUnsignedByte();
			length--;
		}
		if (dwFileAttributes == 268435456
			|| dwFileAttributes == 369098752
			|| dwFileAttributes == 285212672 
			|| dwFileAttributes == 271056896
			|| dwFileAttributes == 824705024
			||	dwFileAttributes == 807927808
			|| dwFileAttributes == 371720192
			|| dwFileAttributes == 369623040)
		{
			fileName = " [" + fileName + "]";
			remoteDirsList.add(fileName); // sf@2004
		}
		else
		{
			remoteFilesList.add(" " + fileName); // sf@2004
		}
	
		// a.add(fileName);
	}

	//Internally used to read directory content of server.
	//Here, server signals end of directory.
	void readFTPMsgDirectoryListEndContent() throws IOException
	{
		is.readInt();
		int length = is.readInt();

		// sf@2004
		a.clear();
		for (int i = 0; i < remoteDirsList.size(); i++) 
			a.add(remoteDirsList.get(i));
		for (int i = 0; i < remoteFilesList.size(); i++) 
			a.add(remoteFilesList.get(i));
		remoteDirsList.clear();
		remoteFilesList.clear();
		
		viewer.ftp.printDirectory(a);
	}

	//Internally used to signify the drive requested is not ready

	void readFTPMsgDirectorydriveNotReady() throws IOException
	{
		System.out.println("Remote Drive unavailable");
		viewer.ftp.connectionStatus.setText(" > WARNING - Remote Drive unavailable (possibly restricted access or media not present)");
		viewer.ftp.remoteStatus.setText("WARNING: Remote Drive unavailable");
	}

	//Call this method to request the list of drives on the server.
	void readServerDriveList()
	{
		try
		{
			viewer.rfb.writeRfbFileTransferMsg(
												RfbProto.rfbDirContentRequest,
												RfbProto.rfbRDrivesList,
												0,
												0,
												null);
		}
		catch (IOException e)
		{
			System.err.println(e);
		}
	}

	// sf@2004 - Read the destination file checksums data
	// We don't use it for now
	void ReceiveDestinationFileChecksums() throws IOException
	{
		int size = is.readInt();
		int length = is.readInt();
		
		byte[] ReceptionBuffer = new byte[length + 32];

		// Read the incoming file data
		is.readFully(ReceptionBuffer,0, length);

		/*
		String csData = "";
		for (int i = 0; i < length; i++)
		{
			csData += (char) is.readUnsignedByte();
		}
		*/
	
		// viewer.ftp.connectionStatus.setText("Received: 0 bytes of " + size + " bytes");
	}
	
	///////////////////////////////////////////////////////////////////////////////////////////////
	//////////////////////////////////////////////////////////////////////////
	//
	// Write a FramebufferUpdateRequest message
	//

	void writeFramebufferUpdateRequest(
		int x,
		int y,
		int w,
		int h,
		boolean incremental)
		throws IOException {
			if (!viewer.ftp.isVisible()) {
		byte[] b = new byte[10];

		b[0] = (byte) FramebufferUpdateRequest;
		b[1] = (byte) (incremental ? 1 : 0);
		b[2] = (byte) ((x >> 8) & 0xff);
		b[3] = (byte) (x & 0xff);
		b[4] = (byte) ((y >> 8) & 0xff);
		b[5] = (byte) (y & 0xff);
		b[6] = (byte) ((w >> 8) & 0xff);
		b[7] = (byte) (w & 0xff);
		b[8] = (byte) ((h >> 8) & 0xff);
		b[9] = (byte) (h & 0xff);

		os.write(b);
		}
	}

	//
	// Write a SetPixelFormat message
	//

	void writeSetPixelFormat(
		int bitsPerPixel,
		int depth,
		boolean bigEndian,
		boolean trueColour,
		int redMax,
		int greenMax,
		int blueMax,
		int redShift,
		int greenShift,
		int blueShift,
		boolean fGreyScale) // sf@2005
		throws IOException {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费观看成人鲁鲁鲁鲁鲁视频| 国产欧美日韩视频在线观看| 久久在线免费观看| 在线免费观看日本欧美| 日韩视频免费观看高清完整版 | 欧美视频一区二区三区四区 | 国产日韩欧美精品在线| 色婷婷国产精品综合在线观看| 亚洲色图欧美激情| 欧美日韩精品一区视频| 九色|91porny| 国产精品美女久久久久av爽李琼| 色999日韩国产欧美一区二区| 午夜一区二区三区在线观看| 日韩精品专区在线| 成人性生交大片免费看视频在线| 亚洲日本青草视频在线怡红院| 免费久久99精品国产| 久久国产精品露脸对白| 日韩免费电影网站| 中文字幕中文字幕中文字幕亚洲无线 | 国产精品美女久久久久久久网站| 亚洲影院理伦片| 国内一区二区在线| 欧美日韩中文字幕一区二区| 玉足女爽爽91| 蜜桃精品在线观看| 国产精品久久免费看| 欧美日韩二区三区| 福利一区二区在线观看| 日本vs亚洲vs韩国一区三区二区| 国产日韩欧美激情| 欧美久久久久久久久| 国产成人精品综合在线观看 | 久久久久国产精品麻豆ai换脸| 99精品久久久久久| 免费高清在线一区| 亚洲精品国产视频| 久久精品欧美日韩| 欧美日韩国产高清一区二区三区| 国产精品乡下勾搭老头1| 亚洲午夜影视影院在线观看| 国产午夜一区二区三区| 555www色欧美视频| jlzzjlzz欧美大全| 精品一区二区三区视频在线观看| 最新久久zyz资源站| 日韩一区二区在线观看| 色悠久久久久综合欧美99| 国产一区美女在线| 日韩av不卡在线观看| 亚洲精选视频在线| 国产日韩欧美一区二区三区乱码 | 午夜伊人狠狠久久| 亚洲视频一区在线观看| 26uuu色噜噜精品一区二区| 在线免费观看日本欧美| 不卡视频免费播放| 国产综合久久久久影院| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲免费高清视频在线| 欧美韩国日本一区| 精品欧美久久久| 欧美一区二区日韩| 欧美日韩免费电影| 欧洲国产伦久久久久久久| jlzzjlzz亚洲日本少妇| 丁香天五香天堂综合| 精品一区二区三区免费视频| 日韩欧美国产电影| 91视频www| av激情综合网| 久久av资源网| 亚洲乱码国产乱码精品精98午夜| 欧美日本免费一区二区三区| 国产精品综合一区二区| 国产午夜三级一区二区三| 波多野结衣在线aⅴ中文字幕不卡| 国产精品电影院| 91精品久久久久久久久99蜜臂| 91国在线观看| 亚洲激情校园春色| 玉足女爽爽91| 亚洲国产成人porn| 亚洲国产日韩一级| 日韩精品国产精品| 青青草91视频| 久久99精品久久久久婷婷| 狠狠色丁香婷婷综合| 国产乱子轮精品视频| 国产毛片一区二区| 成人一道本在线| 99精品欧美一区二区蜜桃免费| 日本乱人伦aⅴ精品| 在线亚洲精品福利网址导航| 欧美性videosxxxxx| 91精品国产黑色紧身裤美女| 久久综合资源网| 国产欧美一区二区三区网站| 亚洲欧美视频一区| 日韩av网站免费在线| 国产乱码精品一区二区三区av| 国产v综合v亚洲欧| 色香色香欲天天天影视综合网| 欧美日韩国产精选| 久久久午夜精品| 亚洲欧美日韩一区二区| 日本不卡视频在线| 国产a视频精品免费观看| 色天天综合久久久久综合片| 制服视频三区第一页精品| 久久久久久久久免费| 亚洲欧美色一区| 免费一级片91| 97se亚洲国产综合自在线观| 91精品国产色综合久久久蜜香臀| 国产欧美日韩中文久久| 亚洲不卡一区二区三区| 国产在线不卡一卡二卡三卡四卡| 不卡av在线网| 日韩一区二区免费视频| 亚洲欧洲99久久| 免费国产亚洲视频| 97超碰欧美中文字幕| 欧美变态凌虐bdsm| 亚洲人精品午夜| 国产一区二区福利| 欧美写真视频网站| 欧美激情中文字幕| 美女一区二区三区在线观看| 国产在线精品一区二区三区不卡| 色视频欧美一区二区三区| 国产欧美一区二区精品婷婷| 91福利国产精品| 国产精品久久毛片a| 日韩中文欧美在线| 欧美图区在线视频| 中文字幕视频一区二区三区久| 亚瑟在线精品视频| 在线一区二区三区四区| 久久婷婷久久一区二区三区| 五月综合激情婷婷六月色窝| 欧美精选一区二区| 盗摄精品av一区二区三区| 67194成人在线观看| 亚洲黄一区二区三区| 国产福利一区二区三区| 日韩视频一区二区三区在线播放| 亚洲精品国产一区二区三区四区在线 | 91精选在线观看| 亚洲精品欧美在线| 成人av在线资源| 国产日韩精品一区| 国产呦精品一区二区三区网站| 欧美日韩一区二区三区四区 | 95精品视频在线| 久久在线观看免费| 另类调教123区| 欧美嫩在线观看| 亚洲成人综合网站| 欧美无乱码久久久免费午夜一区 | 午夜精品免费在线| 91丝袜呻吟高潮美腿白嫩在线观看| 国产亚洲精品超碰| 久久国产精品无码网站| 日韩久久久精品| 免费在线欧美视频| 日韩一区二区免费在线电影| 日韩精品成人一区二区三区| 欧美日韩国产片| 亚洲一区在线视频| 欧美日韩免费视频| 午夜不卡av免费| 欧美一级黄色大片| 久久成人综合网| 久久精品亚洲精品国产欧美 | 国产乱子伦视频一区二区三区| www国产亚洲精品久久麻豆| 国产老女人精品毛片久久| 久久精品亚洲乱码伦伦中文 | 久久精品国产99久久6| 精品国产免费久久 | 奇米精品一区二区三区在线观看| 日韩欧美中文一区| 国内精品第一页| 国产欧美日韩综合| 色婷婷亚洲精品| 五月婷婷久久丁香| 欧美大尺度电影在线| 成人一区二区三区视频在线观看 | 午夜精品福利在线| 欧美刺激脚交jootjob| 国产毛片精品视频| ㊣最新国产の精品bt伙计久久| 欧美日韩中字一区| 国产精品一区在线| 中文字幕五月欧美| 91精品国产欧美一区二区| 国产黑丝在线一区二区三区| 一区二区三区欧美亚洲|