Java app으로 이미지를 보내야합니다. 기본적으로, 나는 이미지에서 byte 배열을 전송하는 rf 모듈에 보내야한다. 다른 rf 모듈은 바이트 배열을 받아서 이미지를 만들어야하는 java app에 보낸다.이미지를 안드로이드에서 자바 응용 프로그램으로 연속적으로 전송하는 중 오류가 발생했습니다. -javax.imageio.IIOException : 허위 허프만 테이블 정의
안드로이드 코드 :
FileInputStream fis = new FileInputStream(myFile);
byte[] b=new byte[(int)myFile.length()];
fis.read(b);server.send(b);
자바 코드 :
FileOutputStream fwrite = new FileOutputStream(new File("my_xml"),true);
fwrite.write(bb);//bb is a byte from rf using input stream as soon as a byte comes it is read to file. This is necessary for some other reasons
fwrite.flush();
fwrite.close();
전체 파일 점점 후 :
FileInputStream fir=new FileInputStream("my_xml");
final BufferedImage bufferedImage = ImageIO.read(fir);
ImageIO.write(bufferedImage, "bmp", new File("image.bmp"));
fir.close();
을 나는 오류 javax.imageio.IIOException 무엇입니까 : 가짜 허프만 테이블 정의를 텍스트 파일이 완벽하게 전송되기 때문에 rf가 잘 작동합니다. p.I 이미지가없는 경우에도 코드가 JPEG로 변경된 후에도 이미지를 제공하지 않음
무엇이이 _rf_ 언급 했습니까? – Ridcully