Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 자바
- 모던음악만만세
- 퀄컴
- VoIP
- 김장훈
- brew
- HSDPA
- 유희열의라디오천국
- "명탐정 코난"
- ETF
- Java
- 차트쇼쇼쇼
- 공정위
- 그녀가말했다
- 민동현
- 이지형
- USIM
- 한국의 기획자들
- 페이스북
- Wibro
- 러시아
- CDMA
- EV-DO Rev. B
- itmusic
- 김장훈의who
- SWT
- 라디오
- 민동현의토요명화
- 위피
- 사요
Archives
- Today
- Total
01-29 02:37
zyint's blog
JMAC APE verify 본문
/*
* 21.04.2004 Original verion. davagin@udm.ru.
*-----------------------------------------------------------------------
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*----------------------------------------------------------------------
*/
package davaguine.jmac.test;
import davaguine.jmac.core.APESimple;
import davaguine.jmac.tools.ProgressCallback;
/**
* Author: Dmitry Vaguine
* Date: 04.03.2004
* Time: 14:51:31
*/
public class Verify extends ProgressCallback {
private static long g_nInitialTickCount;
public void callback(int persent) {
double dProgress = ((double) (pPercentageDone)) / 1000;
double dElapsedMS = (System.currentTimeMillis() - g_nInitialTickCount);
double dSecondsRemaining = (((dElapsedMS * 100) / dProgress) - dElapsedMS) / 1000;
System.out.println("Progress: " + dProgress + " (" + dSecondsRemaining + " seconds remaining) ");
}
public static void main(String[] args) {
try {
///////////////////////////////////////////////////////////////////////////////
// error check the command line parameters
///////////////////////////////////////////////////////////////////////////////
if (args.length != 1) {
System.out.print("~~~Improper Usage~~~\n\n");
System.out.print("Usage Example: Verify \"c:\\1.ape\"\n\n");
return;
}
///////////////////////////////////////////////////////////////////////////////
// variable declares
///////////////////////////////////////////////////////////////////////////////
String pFilename = args[0]; //the file to open
///////////////////////////////////////////////////////////////////////////////
// attempt to verify the file
///////////////////////////////////////////////////////////////////////////////
// set the start time and display the starting message
g_nInitialTickCount = System.currentTimeMillis();
System.out.println("Verifying '" + pFilename + "'...");
// do the verify (call unmac.dll)
APESimple.VerifyFile(pFilename, new Verify());
// process the return value
} catch (Exception e) {
e.printStackTrace();
}
}
}
* 21.04.2004 Original verion. davagin@udm.ru.
*-----------------------------------------------------------------------
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*----------------------------------------------------------------------
*/
package davaguine.jmac.test;
import davaguine.jmac.core.APESimple;
import davaguine.jmac.tools.ProgressCallback;
/**
* Author: Dmitry Vaguine
* Date: 04.03.2004
* Time: 14:51:31
*/
public class Verify extends ProgressCallback {
private static long g_nInitialTickCount;
public void callback(int persent) {
double dProgress = ((double) (pPercentageDone)) / 1000;
double dElapsedMS = (System.currentTimeMillis() - g_nInitialTickCount);
double dSecondsRemaining = (((dElapsedMS * 100) / dProgress) - dElapsedMS) / 1000;
System.out.println("Progress: " + dProgress + " (" + dSecondsRemaining + " seconds remaining) ");
}
public static void main(String[] args) {
try {
///////////////////////////////////////////////////////////////////////////////
// error check the command line parameters
///////////////////////////////////////////////////////////////////////////////
if (args.length != 1) {
System.out.print("~~~Improper Usage~~~\n\n");
System.out.print("Usage Example: Verify \"c:\\1.ape\"\n\n");
return;
}
///////////////////////////////////////////////////////////////////////////////
// variable declares
///////////////////////////////////////////////////////////////////////////////
String pFilename = args[0]; //the file to open
///////////////////////////////////////////////////////////////////////////////
// attempt to verify the file
///////////////////////////////////////////////////////////////////////////////
// set the start time and display the starting message
g_nInitialTickCount = System.currentTimeMillis();
System.out.println("Verifying '" + pFilename + "'...");
// do the verify (call unmac.dll)
APESimple.VerifyFile(pFilename, new Verify());
// process the return value
} catch (Exception e) {
e.printStackTrace();
}
}
}
이 글은 스프링노트에서 작성되었습니다.
Comments