📄 inputstreamconverter.java
字号:
package com.esri.solutions.jitk.datasources.ogc.wms;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
public class InputStreamConverter {
public InputStreamConverter() {
}
public byte[] toByteArray(InputStream is) throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int r;
byte[] buffer = new byte[8000];
while ((r = is.read(buffer)) >= 0) {
if (r == 0) {
continue;
}
baos.write(buffer, 0, r);
}
is.close();
return baos.toByteArray();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -