日期:2014-05-18 浏览次数:20717 次
public void run() {
try {
InputStream is = socket.getInputStream();
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
ByteArrayOutputStream baos;
byte[] reader = new byte[1024];
int flag = 0;
// 获取单张图片指令:(GET /image.jpg HTTP/1.1)
// 获取连续获取图片指令:(GET /image HTTP/1.1)
// 发送获取图片的指令可另外控制
bw.write("GET /image HTTP/1.1".toCharArray());
bw.flush();
baos = new ByteArrayOutputStream();
int fatchTime = 0;
while ((flag = is.read(reader)) != -1 && fatchTime < 60) {
// 怎么获取批量图片数据后生成图片?
}
} catch (IOException e) {
} finally {
}
}