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
- FileSystemObject
- utf-8
- SQL Injection
- Getrows
- jquery 레이어
- jQuery
- synology
- lsusb
- replace
- 커널
- println
- XMLHTTP
- 시놀로지
- ASP
- readonly
- 무선랜카드
- form
- PHP GCM
- Injection
- ajax
- RTL88x2BU
- include
- euc-kr
- 따라다니는 배너
- javascript
- submit
- disabled
- AC1300
- DS718+
- 크로스 컴파일
Archives
- Today
- Total
아는 것이 좋은 것이다.
[Java] URL 이미지 다운로드 본문
public static void imgFile(String localPath, String path, String name){ String file_ext=name.substring( name.lastIndexOf('.')+1, name.length()); BufferedImage image = null; try{ image = ImageIO.read(new URL(path+name)); BufferedImage bufferedImage = new BufferedImage(image.getWidth(),image.getHeight(), BufferedImage.TYPE_INT_BGR); Graphics2D graphics = (Graphics2D) bufferedImage.getGraphics(); graphics.setBackground(Color.WHITE); graphics.drawImage(image, 0, 0, null); ImageIO.write(bufferedImage, file_ext, new File(localPath+"/"+name)); System.out.println(name+" 다운완료"); count = 0; }catch(Exception e){ e.printStackTrace(); } } //imgFile("C:\\", "http://sstatic.naver.net/search/img3/", "h1_naver.gif");
'Java Programing' 카테고리의 다른 글
[Java Programing] 특정 URL로 Json 전송 (0) | 2014.10.29 |
---|---|
[Java Programing] 배열에 특정값 삭제하기 (2) | 2014.10.24 |
[Java] 자바 로그 저장 (0) | 2014.06.03 |
[Java] 문자열 세기 Length (0) | 2014.06.01 |
[Java] 숫자를 문자열로 바꾸기, 문자열을 숫자로 바꾸기 (0) | 2014.05.31 |
Comments