{"id":1630,"date":"2012-04-27T06:56:27","date_gmt":"2012-04-27T06:56:27","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=1630"},"modified":"2017-01-27T15:49:07","modified_gmt":"2017-01-27T06:49:07","slug":"java-%ed%8c%8c%ec%9d%bc-%eb%b3%b5%ec%82%ac","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=1630","title":{"rendered":"[Java] \ud30c\uc77c \ubcf5\uc0ac"},"content":{"rendered":"<p>fileName\uc774 \ubcf5\uc0ac\ud560 \ub300\uc0c1 \ud30c\uc77c\uc774\uace0 newFileName\uc774 \ubcf5\uc0ac\ub418\uc5b4 \uc0c8\ub86d\uac8c \uc0dd\uc131\ub420 \ud30c\uc77c\uba85\uc785\ub2c8\ub2e4. \uadfc\ub370 \uc880 \uc0b4\ud3b4\ubcfc\uac8c&#8230; \uc2e4\uc81c \ub370\uc774\ud130\ub97c \ubcf5\uc0ac(\uc804\uc1a1) \uc2dc\ud0a4\ub294 12\ubc88 \ucf54\ub4dc\uc758 transfer \ud568\uc218\ub294 \uc2e4\uc81c\ub85c \uc804\uc1a1\ub41c \ubc14\uc774\ud2b8 \uc218\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4. \uc804\uc1a1\ud558\uace0\uc790 \ud558\ub294 \ubc14\uc774\ud2b8\uc218\uc640 \uc2e4\uc81c\ub85c \uc804\uc1a1\ub41c \ubc14\uc774\ud2b8 \uc218 \uc0ac\uc774\uc5d0 \ucc28\uc774\uac00 \uc788\uc744 \uc218 \uc788\ub2e4\ub294 \uac74\ub370.. \uc774 \ubd80\ubd84\uc5d0 \ub300\ud55c \uace0\ubbfc\uc744 \uc880 \ub354 \ud574\ubd10\uc57c\ud560 \ucf54\ub4dc\uc785\ub2c8\ub2e4.<\/p>\n<pre>try {\r\n    File inFile = new File(fileName);\r\n    FileInputStream inputStream = new FileInputStream(inFile);\r\n    \r\n    File outFile = new File(newFileName);\r\n    FileOutputStream outputStream = new FileOutputStream(outFile);\r\n   \r\n    FileChannel fcin = inputStream.getChannel();\r\n    FileChannel fcout = outputStream.getChannel();\r\n   \r\n    long size = fcin.size();    \r\n    fcin.transferTo(0, size, fcout);\r\n   \r\n    fcout.close();\r\n    fcin.close();\r\n    \r\n    outputStream.close();\r\n    inputStream.close();\r\n} catch (Exception e) {\r\n    e.printStackTrace();\r\n}   \r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>fileName\uc774 \ubcf5\uc0ac\ud560 \ub300\uc0c1 \ud30c\uc77c\uc774\uace0 newFileName\uc774 \ubcf5\uc0ac\ub418\uc5b4 \uc0c8\ub86d\uac8c \uc0dd\uc131\ub420 \ud30c\uc77c\uba85\uc785\ub2c8\ub2e4. \uadfc\ub370 \uc880 \uc0b4\ud3b4\ubcfc\uac8c&#8230; \uc2e4\uc81c \ub370\uc774\ud130\ub97c \ubcf5\uc0ac(\uc804\uc1a1) \uc2dc\ud0a4\ub294 12\ubc88 \ucf54\ub4dc\uc758 transfer \ud568\uc218\ub294 \uc2e4\uc81c\ub85c \uc804\uc1a1\ub41c \ubc14\uc774\ud2b8 \uc218\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4. \uc804\uc1a1\ud558\uace0\uc790 \ud558\ub294 \ubc14\uc774\ud2b8\uc218\uc640 \uc2e4\uc81c\ub85c \uc804\uc1a1\ub41c \ubc14\uc774\ud2b8 \uc218 \uc0ac\uc774\uc5d0 \ucc28\uc774\uac00 \uc788\uc744 \uc218 \uc788\ub2e4\ub294 \uac74\ub370.. \uc774 \ubd80\ubd84\uc5d0 \ub300\ud55c \uace0\ubbfc\uc744 \uc880 \ub354 \ud574\ubd10\uc57c\ud560 \ucf54\ub4dc\uc785\ub2c8\ub2e4. try { File inFile = new File(fileName); FileInputStream inputStream &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=1630\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;[Java] \ud30c\uc77c \ubcf5\uc0ac&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60],"tags":[51],"class_list":["post-1630","post","type-post","status-publish","format-standard","hentry","category-java","tag-java"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1630"}],"version-history":[{"count":1,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1630\/revisions"}],"predecessor-version":[{"id":3073,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1630\/revisions\/3073"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1630"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}