springboot 그림의 흐름 읽기
502 단어 처음
String logo1=list.get(i).getLogo();
File file = new File(logo1);
FileInputStream inputStream = null;
try {
inputStream = new FileInputStream(file);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
byte[] bytes = new byte[inputStream.available()];
inputStream.read(bytes, 0, inputStream.available());
// byte[] String
String logo2=new String(bytes);
sp.setLogo(logo2);
설명: 여기 로고1은 그림의 저장 주소를 얻는 것입니다. 간단하지 않습니까? 이 로고는 그림이 2진 흐름으로 변환되는 형식으로 문자열에 해당합니다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Vue 페이지 수동 새로 고침, 탐색 표시줄 활성화 항목을 초기 상태로 복원장면 설명: 페이지에 맨 위 네비게이션과 왼쪽 네비게이션이 존재하고 왼쪽 네비게이션과 오른쪽 내용 구역은 명명 보기를 사용하여 실현된다. 왼쪽 네비게이션의 링크를 클릭하면 오른쪽 내용 구역은 서로 다른 구성 요소의 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.