<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>달콤 쌉싸래한 인생 &#187; Java</title>
	<atom:link href="http://jongsunkim.pe.kr/archives/category/programming/java/feed" rel="self" type="application/rss+xml" />
	<link>http://jongsunkim.pe.kr</link>
	<description>Be fully awake if you want to dream</description>
	<lastBuildDate>Sat, 19 Nov 2011 08:34:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>java reflectioin exam</title>
		<link>http://jongsunkim.pe.kr/archives/1585</link>
		<comments>http://jongsunkim.pe.kr/archives/1585#comments</comments>
		<pubDate>Mon, 28 Mar 2011 08:52:05 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=1585</guid>
		<description><![CDATA[http://java.sun.com/developer/technicalArticles/ALT/Reflection/]]></description>
			<content:encoded><![CDATA[<p>http://java.sun.com/developer/technicalArticles/ALT/Reflection/</p>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/1585/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>URL 주소가 가리키는 파일 읽어서 저장</title>
		<link>http://jongsunkim.pe.kr/archives/1567</link>
		<comments>http://jongsunkim.pe.kr/archives/1567#comments</comments>
		<pubDate>Thu, 03 Mar 2011 14:31:07 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java IO&NIO]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=1567</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<pre class="brush: java; title: ; notranslate">
package com.test.url;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

public class URLSaver {
    public static void main(String[] args) {
        if(args.length != 2) {
            System.out.println(&quot;사용법 : java URLSaver URL filename&quot;);
            System.exit(1);
        }

        URL url = null;

        try {
            url = new URL(args[0]);
        } catch (MalformedURLException e) {
            System.out.println(&quot;잘못된 URL 형식입니다.&quot;);
            System.exit(1);
            e.printStackTrace();
        }

        FileOutputStream fos = null;

        try {
            URLConnection urlConnection = url.openConnection();
            InputStream in = urlConnection.getInputStream();

            fos = new FileOutputStream(args[1]);
            byte[] buffer = new byte[512];
            int readcount = 0;

            System.out.println(&quot;읽기 시작&quot;);
            while((readcount = in.read(buffer)) != -1) {
                fos.write(buffer, 0, readcount);
            }
            System.out.println(&quot;파일 저장 완료&quot;);
        } catch (IOException e) {
             e.printStackTrace();
        } finally {
            try {
                if(fos != null) {
                    fos.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/1567/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sun JVM의 Heap의 구조와 Garbage Collection</title>
		<link>http://jongsunkim.pe.kr/archives/1423</link>
		<comments>http://jongsunkim.pe.kr/archives/1423#comments</comments>
		<pubDate>Wed, 15 Dec 2010 08:53:42 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=1423</guid>
		<description><![CDATA[http://performeister.tistory.com/14]]></description>
			<content:encoded><![CDATA[<p><a href="http://performeister.tistory.com/14">http://performeister.tistory.com/14</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/1423/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Servlet 과 JSP 의 차이</title>
		<link>http://jongsunkim.pe.kr/archives/1419</link>
		<comments>http://jongsunkim.pe.kr/archives/1419#comments</comments>
		<pubDate>Wed, 15 Dec 2010 08:48:26 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[JSP&Servlet]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=1419</guid>
		<description><![CDATA[Servlet의 생명주기 서블릿의 생명주기는 서블릿이 deployed 되어 있는 컨테이너에 의해 관리된다. 컨테이너는 다음과 같은 단계로 동작하는데 1. 서블릿 인스턴스가 존재하지 않을 경우 a. 서블릿 클래스를 로딩한다. b. 서블릿 클래스 인스턴스를 생성한다. c. init() 메서드를 호출해서 서블릿 인스턴스를 초기화 한다. 2. service() 메서드가 호출, request와 response 객체를 넘겨준다. service() 메서드는 클라이언트 요청에 따라 doGet() 또는 doPost() [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Servlet의 생명주기</strong></p>
<p>서블릿의 생명주기는 서블릿이 deployed 되어 있는 컨테이너에 의해 관리된다.</p>
<p>컨테이너는 다음과 같은 단계로 동작하는데</p>
<p>1. 서블릿 인스턴스가 존재하지 않을 경우</p>
<p>a. 서블릿 클래스를 로딩한다.</p>
<p>b. 서블릿 클래스 인스턴스를 생성한다.</p>
<p>c. init() 메서드를 호출해서 서블릿 인스턴스를 초기화 한다.</p>
<p>2. service() 메서드가 호출, request와 response 객체를 넘겨준다. service() 메서드는 클라이언트 요청에 따라 doGet() 또는 doPost() 메서드를 호출.</p>
<p>마지막으로 서블릿을 컨테이너에서 제거할 땐 destroy() 메서드를 호출한다.</p>
<p><strong>JSP의 생명주기</strong></p>
<p>1. 컨테이너는 .jsp 파일을 서블릿 파일을 만들기 위한 .java 소스 파일로 변환합니다.</p>
<p>2. 컨테이너는 .java 파일을 컴파일하여 .class 파일로 만듭니다.</p>
<p>3. 컨테이너는 새로 생성된 서블릿 클래스를 메모리로 로딩합니다.</p>
<p>4. 컨테이너가 서블릿을 인스턴스화하면 인스턴스 jspInit() 메서드가 실행됩니다. 이 객체는 클라이언트 요청을 처리할 수 있는 완전한 서블릿으로 거듭나게 됩니다.</p>
<p>5. 요청이 들어올 때마다 컨테이너는 새로운 스레드를 만들어 _jspService() 메서드를 실행합니다.</p>
<p>참고</p>
<p><a href="http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets4.html">http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets4.html</a></p>
<p><a href="http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets7.html">http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets7.html</a></p>
<p>Head First Servlet&amp;JSP</p>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/1419/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu 10.10 64bit jdk</title>
		<link>http://jongsunkim.pe.kr/archives/1416</link>
		<comments>http://jongsunkim.pe.kr/archives/1416#comments</comments>
		<pubDate>Wed, 15 Dec 2010 07:16:06 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=1416</guid>
		<description><![CDATA[1. sudo add-apt-repository ppa:sun-java-community-team/sun-java6 2. sudo apt-get update 3. sudo apt-get install sun-java6-jdk 끝!]]></description>
			<content:encoded><![CDATA[<p>1. sudo add-apt-repository ppa:sun-java-community-team/sun-java6</p>
<p>2. sudo apt-get update</p>
<p>3. sudo apt-get install sun-java6-jdk</p>
<p>끝!</p>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/1416/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>세련된 자바 웹 프로그래머 되기</title>
		<link>http://jongsunkim.pe.kr/archives/1350</link>
		<comments>http://jongsunkim.pe.kr/archives/1350#comments</comments>
		<pubDate>Mon, 01 Nov 2010 12:34:28 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=1350</guid>
		<description><![CDATA[1. 기본기 갈고 닦기 2. 웹 프로젝트 개발 환경 갖추기 3. 패턴, 프레임워크 XP]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.zdnet.co.kr/ArticleView.asp?artice_id=00000039134853" target="_blank">1. 기본기 갈고 닦기</a></p>
<p><a href="http://www.zdnet.co.kr/ArticleView.asp?artice_id=00000039135663" target="_blank">2. 웹 프로젝트 개발 환경 갖추기</a></p>
<p><a href="http://www.zdnet.co.kr/ArticleView.asp?artice_id=00000039136776" target="_blank">3. 패턴, 프레임워크 XP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/1350/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Reflection</title>
		<link>http://jongsunkim.pe.kr/archives/1310</link>
		<comments>http://jongsunkim.pe.kr/archives/1310#comments</comments>
		<pubDate>Mon, 25 Oct 2010 13:57:39 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=1310</guid>
		<description><![CDATA[﻿ Java API에는 reflection 이라는 패키지가 있다. 이 패키지에 있는 클래스들을 써서 JVM에 로딩되어 있는 클래스와 메소드 정보를 읽어 올 수 있다. Class 클래스 Method 클래스 Field 클래스 Class 클래스 Class 클래스는 클래스에 대한 정보를 얻기에 좋은 클래스이다. Class 클래스는 생성자가 따로 없다. Object 클래스에 있는 getClass() 메소드를 이용하는 것이 일반적이다. Method 클래스 Method 클래스를 [...]]]></description>
			<content:encoded><![CDATA[<p>﻿</p>
<p>Java API에는 reflection 이라는 패키지가 있다. 이 패키지에 있는 클래스들을 써서 JVM에 로딩되어 있는 클래스와 메소드 정보를 읽어 올 수 있다.</p>
<ul>
<li>Class 클래스</li>
<li>Method 클래스</li>
<li>Field 클래스</li>
</ul>
<h4>Class 클래스</h4>
<p>Class 클래스는 클래스에 대한 정보를 얻기에 좋은 클래스이다. Class 클래스는 생성자가 따로 없다. Object 클래스에 있는 getClass() 메소드를 이용하는 것이 일반적이다.</p>
<h4>Method 클래스</h4>
<p>Method 클래스를 이용하여 메소드에 대한 정보를 읽을 수 있다. 하지만, Method 클래스에는 생성자가 없어서,  Method 클래스의 정보를 얻기 위해서는 Class 클래스의 getMethods() 메소드를 사용하거나  getDeclaredMethod() 메소드를 써야한다.</p>
<h4>Field 클래스</h4>
<p>Field클래스는 클래스에 있는 변수들의 정보를 제공하기 위해서 사용한다. Method 클래스와 마찬가지로 생성자가 존재하지  않으므로 Class 클래스의 getField() 메소드나 getDeclaredFields() 메소드를 써야한다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/1310/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Garbage Collector</title>
		<link>http://jongsunkim.pe.kr/archives/1275</link>
		<comments>http://jongsunkim.pe.kr/archives/1275#comments</comments>
		<pubDate>Tue, 19 Oct 2010 11:25:37 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=1275</guid>
		<description><![CDATA[GC란? Java 에서는 메모리 관리를  GC 라는 알고리즘을 통하여 관리하기 때문에, 개발자가 메모리를 처리하기 위한 로직을 만들 필요가 없고, 절대로 만들어서는 안 된다. GC의 원리 GC 작업을 하는 가비지 콜렉터(Garbage Collector)는 다음의 역할을 한다. 메모리 할당 사용 중인 메모리 인식 사용하지 않는 메모리 인식 사용하지 않는 메모리를 인식하는 작업을 수행하지 않으면, 할당한 메모리 영역이 꽉차서 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>GC란?</strong></p>
<p>Java 에서는 메모리 관리를  GC 라는 알고리즘을 통하여 관리하기 때문에, 개발자가 메모리를 처리하기 위한 로직을 만들 필요가 없고, 절대로 만들어서는 안 된다.</p>
<p><strong>GC의 원리</strong></p>
<p>GC 작업을 하는 가비지 콜렉터(Garbage Collector)는 다음의 역할을 한다.</p>
<ul>
<li>메모리 할당</li>
<li>사용 중인 메모리 인식</li>
<li>사용하지 않는 메모리 인식</li>
</ul>
<p>사용하지 않는 메모리를 인식하는 작업을 수행하지 않으면, 할당한 메모리 영역이 꽉차서 WAS에 행(Hang)이 걸리거나, 더 많은 메모리를 할당하려는 현상이 발생할 것이다.</p>
<p><strong>GC종류</strong></p>
<p>GC는 크게 두 가지 타입으로 나뉜다. 마이너 GC와 메이저 GC의 두 가지 GC가 발생할 수 있다.</p>
<ul>
<li>마이너GC : Young 영역에서 발생하는 GC</li>
<li>메이저GC : Old 영역이나 Perm 영역에서 발생하는 GC</li>
</ul>
<p>이 두 가지 GC가 어떻게 상호 작용하느냐에 따라서 GC 방식에 차이가 나며, 성능에도 영향을 준다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/1275/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Model 1 vs Model 2 Architecture</title>
		<link>http://jongsunkim.pe.kr/archives/1251</link>
		<comments>http://jongsunkim.pe.kr/archives/1251#comments</comments>
		<pubDate>Sun, 10 Oct 2010 08:21:08 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=1251</guid>
		<description><![CDATA[Model(20100812) 모델1 과 모델2 아키텍처 차이점. View more presentations from Kim Jong Sun.]]></description>
			<content:encoded><![CDATA[<div id="__ss_5404476" style="width: 425px;"><strong><a title="Model(20100812)" href="http://www.slideshare.net/jongsun/model20100812">Model(20100812)</a></strong><object id="__sse5404476" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=model20100812-101010031824-phpapp01&amp;stripped_title=model20100812&amp;userName=jongsun" /><param name="name" value="__sse5404476" /><param name="allowfullscreen" value="true" /><embed id="__sse5404476" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=model20100812-101010031824-phpapp01&amp;stripped_title=model20100812&amp;userName=jongsun" name="__sse5404476" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<div style="width: 425px;"></div>
<div style="width: 425px;">모델1 과 모델2 아키텍처 차이점.</p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/jongsun">Kim Jong Sun</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/1251/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>객체 스트림</title>
		<link>http://jongsunkim.pe.kr/archives/1134</link>
		<comments>http://jongsunkim.pe.kr/archives/1134#comments</comments>
		<pubDate>Tue, 03 Aug 2010 02:13:17 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Java IO&NIO]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=1134</guid>
		<description><![CDATA[객체 스트림 객체를 아주 쉽게 전송할 수 있는 방법을 말한다. 객체가 전송된다는 의미는 객체가 내부적으로 참조하는 객체들 역시 함께 전송되는 것을 뜻한다. 객체를 전송하려면 다음과 같은 순서를 거쳐야 한다. 1. 데이터를 특정 통신 채널로 보낼 수 있는 형태로 바꾼다. 이를 마샬링(marshaling)이라고 한다. 2. 변환된 데이터를 전송하거나 쓴다. 3. 변환된 데이터를 읽어 들어 원래의 형태로 변환한다. [...]]]></description>
			<content:encoded><![CDATA[<h4>객체 스트림</h4>
<p>객체를 아주 쉽게 전송할 수 있는 방법을 말한다. 객체가 전송된다는 의미는 객체가 내부적으로 참조하는 객체들 역시 함께 전송되는 것을 뜻한다.</p>
<p>객체를 전송하려면 다음과 같은 순서를 거쳐야 한다.</p>
<p>1. 데이터를 특정 통신 채널로 보낼 수 있는 형태로 바꾼다. 이를 마샬링(marshaling)이라고 한다.</p>
<p>2. 변환된 데이터를 전송하거나 쓴다.</p>
<p>3. 변환된 데이터를 읽어 들어 원래의 형태로 변환한다. 이를 언마샬링(unmarshaling)이라고 한다.</p>
<h4>마샬링(marshaling)</h4>
<p>마샬링이란 데이터를 바이트의 흐름으로 만들어 TCP와 같은 통신 채널을 통해서 전송하거나 스트림으로 써줄 수 있는 형태로 바꾸는 과정을 말한다.</p>
<h4>전송</h4>
<p>데이터를 발신지에서 목적지로 전달하는 과정을 말한다. 전송을 위해서 객체 스트림은 바이트 기반의 표준 스트림을 이용하게 된다.</p>
<p>네트워크에 대한 전송뿐만 아니라 파일에 쓰기를 할 경우에도 객체 스트림은 바이트 기반의 표준 스트림을 이용하게 된다.</p>
<h4>언마샬링</h4>
<p>언마샬링이란 마샬링과 반대로, 전송받은 데이터를 원래의 형태로 변환하는 과정을 뜻한다. 그리고 전달받은 데이터는 원래 형태로 변환될 수 있는 충분한 내용을 포함하고 있다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/1134/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

