Skip to content
DarkKaiser의 블로그
DarkKaiser의 블로그
  • 개발 관련 자료(노션)
  • Raspberry Pi(노션)
  • WD My Cloud(노션)
  • GitHub
DarkKaiser의 블로그

[카테고리:] Java

Jad Decompiler 사용법

DarkKaiser, 2008년 4월 3일2023년 9월 5일

Jad home page: http://www.kpdus.com/jad.html#download

[ 사용방법 ]

1. 클래스 하나만 디컴파일시

           example1.class   를 디컴파일시 

           jad.exe 를 디컴파일할 파일과 동일한 폴더에 놓는다.

           Command 창에   jad -o -sjava example1.class   

   결과물 : ‘example1.java’ 

2.

Continue Reading

URL 클래스를 이용한 웹 페이지 긁어오기

DarkKaiser, 2008년 2월 28일2023년 9월 5일
BufferedReader br = null;
  
try {
  URL url = new URL("http://www.empas.com");
  br = new BufferedReader(new InputStreamReader(url.openStream()));
   
  String line = null;
  while ((line = br.readLine()) != null) {
    System.out.println(line);
  }
} catch (MalformedURLException e) {
  e.printStackTrace();
} catch (IOException e) {
  e.printStackTrace();
} finally {
  try {
    br.close();
  } catch (IOException 
Continue Reading

스트림 사용 예제

DarkKaiser, 2007년 6월 25일2023년 9월 5일

FileInputStream, FileOutputStream

FileInputStream fi = new FileInputStream(new File("d:\\temp\\temp.xls"));
FileOutputStream fo = new FileOutputStream("d:\\temp\\temp2.xls");
 
int b;
while ((b = fi.read()) != -1) {
 fo.write(b);
 fo.flush();
}
  
fi.close();
fo.close();

RandomAccessFile

public static void main(String[] args) throws IOException {
  String s = "ILoveJava~";
  String q = "Jabook!";

  RandomAccessFile rf = new RandomAccessFile("RandomAccessFile.txt", "rw");
  
Continue Reading

스트림

DarkKaiser, 2007년 6월 25일2023년 9월 4일

스트림의 정의
장치로부터 데이터를 얻거나 보낼 때 사용되는 중간 매개체 역활을 하는 놈


입력 스트림 비교

입력 스트림은 데이터를 먼저 스트림으로 읽어들입니다. 그리고 스트림에 존재하는 데이터를 하나씩 읽어들일 수 있습니다.


출력 스트림 비교

출력 스트림으로 데이터를 보냅니다. 그리고 출력 스트림에 보낸 데이터를 비워 버립니다. 그렇게 되면 출력 스트림에 존재하던 데이터가

Continue Reading

스레드 생성 및 동기화

DarkKaiser, 2007년 6월 22일2023년 9월 6일

스레드를 생성하는 방법

  • Thread 클래스를 상속받는 방법
/* Thread 클래스를 상속 받는 방법과 run() 메서드 재정의 */ 
import java.lang.Thread;
class NewThread exends Thread {
   public void run() {
      /* Thread Body */ 
   }
}

/* Thread 클래스를 상속받았을 경우 스레드를 start 하는 방법 */ 
NewThread n = new NewThread();
n.start(); 
Continue Reading

Vector, Hashtable, 열거자

DarkKaiser, 2007년 6월 22일2023년 9월 6일

Vector 클래스
데이터의 입력한 순서에 따라서 데이터 추출, index로 추출

Vector vector = new Vector();
vector.addElement(new Character('A'));
vector.addElement(new String("test"));
vector.addElement(new Integer(100));
vector.addElement(new Integer(200));
vector.insertElementAt(new Float(3.14), 1); // 1번째에 중간 삽입
vector.setElementAt(new String("Set"), 3);  // 3번째 존재하는 것 제거후 다시 삽입

System.out.println("vector의 0번째:" + (Character)vector.elementAt(0));

if (vector.contains(new String("Set"))) {  // vector에 
Continue Reading

배열

DarkKaiser, 2007년 6월 22일2023년 9월 6일

배열의 특징

  • 배열은 객체다.
  • 배열의 이름은 참조값이다.
  • 배열을 할당할 때는 데이터 타입은 같아야 한다.

배열의 선언 & 초기화

int[] mydream = new int[]{5,4,6,3,2,6};
int[] mytarget = {100, 200, 300, 400, 500};

배열의 복사

  • System.arraycopy() 메서드를 이용하는 방법
    int[] mydream = new int[]{5, 4, 6, 9, 7, 9};
    int[] mytarget =
Continue Reading

Upcasting과 Downcasting

DarkKaiser, 2007년 6월 22일2023년 9월 4일
  • Upcasting
    • 상위 클래스로의 캐스팅,
  • Downcasting
    • Upcasting한 것을 다시 원래의 형으로 복구시켜주는 작업
Continue Reading

abstract와 interface

DarkKaiser, 2007년 6월 22일2023년 9월 4일

abstract

  • 추상메서드는 몸체 없는 프로토타입만을 가진 메서드이다.
  • 추상메서드는 반드시 메서드 이름 앞에 abstract 키워드를 명시해야 한다.
  • 추상메서드를 단 하나라도 포함하고 있으면 추상 클래스가 된다.
  • 추상클래스는 클래스 이름 앞에 abstract를 명시해야 한다.
  • 반드시 상속을 이용하여 객체를 생성할 수 있으며, 추상메서드를 가진다면 추상메서드를 모두 구현한 뒤, 객체를 생성할 수 있다.
  • abstract 클래스는
Continue Reading
  • Previous
  • 1
  • 2
  • 3

최신 글

  • AssertJ 소개testCompile ‘org.assertj:assertj-core:3.6.2’ 2017년 9월 14일
  • 자주 사용되는 Lombok 어노테이션 2017년 9월 14일
  • 유니코드 #3 2017년 9월 14일
  • 유니코드 #2 2017년 9월 14일
  • 유니코드 #1 2017년 9월 14일

최신 댓글

    카테고리

    • 개인 자료 (1)
      • 일기 (1)
    • 주절주절 (7)
    • 프로그래밍 갤러리 (16)
    • 프로그래밍 언어 (186)
      • Java (29)
      • C/C++/VC++ (114)
      • C# (11)
      • Visual Basic (6)
      • 안드로이드 (9)
      • Objective-C (5)
      • JavaScript (4)
      • JSP/Servlet (2)
      • Python (4)
      • 어셈블러 (1)
    • 개발++ (44)
      • Book (11)
        • Joel On Software (10)
      • 프로젝트 관리 (6)
      • Maven (1)
      • 디버깅 (1)
      • DirectX (1)
      • Silverlight (1)
      • RESTful (1)
      • Hacking (1)
      • WDM (4)
      • VoIP (5)
      • 기타 (1)
    • 개발 도구 (15)
      • eclipse (14)
      • Sublime Text (1)
    • 네트워크 (7)
    • 설치 및 배포 (7)
      • InstallShield (2)
      • NSIS (4)
    • 버전 관리 (9)
      • Git (2)
      • CVS (2)
      • Subversion (5)
    • 데이터베이스 (7)
      • Oracle (3)
      • Sybase (2)
      • MS-SQL (2)
    • 단위테스트 (3)
      • JUnit (1)
      • NUnit (2)
    • 버그추적시스템 (2)
      • mantis (2)
    • 운영체제 (7)
      • Windows (5)
      • 리눅스 (2)
    • WAS (3)
      • WebLogic (3)
    • 디자인패턴 (1)
    • 디지털 이미지 프로세싱 (16)

    태그

    Assert() AutoExp.dat CppUnit CVS cvsnt Detours Generic Git ignore파일 Isolation level LogCat new OSI OSI 7 layer pragma RunInstaller Runnable session setPoperty startWebLogic.cmd std::auto_ptr STL STLPort synchronized TAB TCP/IP Thread useBean 날짜 디버깅 마스크 버그트래킹시스템 설치프로젝트 성능 시간 주석 캡쳐 탭 트랜젝션 트리 픽셀 형변환 형식 후킹 히스토그램

    메타

    • 로그인
    • 엔트리 피드
    • 댓글 피드
    • WordPress.org
    ©2025 DarkKaiser의 블로그 | WordPress Theme by SuperbThemes