substring .substring(단어시작 노드번호,검색할 단어갯수-생략시 전체갯수)//파일속성public void property() throws Exception{ String url = "D:\\product\\pd1.jpg"; File f = new File(url); System.out.println(f.getName()); //파일명을 가져와라 //파일 속성명(확장자)만 가져오기 String filename = f.getName(); //해당 단어를 기준으로 맨 마지막에 해당되는 단어 노드번호 int n = filename.lastIndexOf("."); //(단어시작 노드번호,검색할 단어갯수-생략시 전체갯수) String modify = filename.su.. 2024. 5. 22. #15-1 / 이미지(binary) * 이미지(binary) - stream으로만 가능 * stream 사용시 유의사항 1. byte[] 변환 필요 2. InputStream 사용시 read 필수 3. write를 이용할 경우 flush 사용하면 에러가 적다 : 한번 초기화해줌⚡ 이미지 복사-반복문 없이 처리public static void main(String[] args) { try { String img = "D:\\webpage\\agree\\src\\main\\java\\io\\img.jpg"; //원본이미지 FileInputStream fs = new FileInputStream(img); //파일을 로드 byte[] by = new byte[fs.available()]; //이미.. 2024. 5. 22. #14-3 / Stream 활용법 Reader ,Writer,File -> ASCII 전용 Stream -> 바이너리(이미지 , 동영상, 오디오, pdf,zip 등..) Stream은 byte단위로 변환 후 집어넣어야 함! byte[] data = ag.getBytes(); InputStream(입력) 부모 - 하위: FileInputStream , AudioInputStream, ObjectInputStream..등 자식 OutputStream(출력) 부모 - 하위: FileOutputStream..등 자식 ⚡ FileInputStream FileInputStream : io - buffer 필수대상 파일을 로드 한 후 해당 내용을 byte로 변환하여 결과 출력 (입력 X) - 걍 출력만 함available() : 파일 용량 (byt.. 2024. 5. 21. Git setting Cmd등록 :git config --global user.name ""git config --global user.email ""확인 : git config user.name git config user.email Git 프로그램 설치 Github 로그인 => git 사용 이름,git 사용 이메일 정보 겟 =>토큰 제작(패스워드) - admin:ssh_signing_key 빼고 체크=> Git repository( ? 자료를 공유할 수 있는 공간)에 참여,혹은 만들기 => 아이디,패스워드 등록 => repository 생성 STSshow view create new local .. - 경로(src)remotes 우클릭 - create remote - uri , 비밀번호 등록 -> save and .. 2024. 5. 21. 이전 1 ··· 56 57 58 59 60 61 62 ··· 77 다음