gpt4 book ai didi

java - 如何将 ZipInputStream 转换为 InputStream?

转载 作者:搜寻专家 更新时间:2023-11-01 01:37:41 25 4
gpt4 key购买 nike

我有代码,其中 ZipInputSream 被转换为 byte[],但我不知道如何将其转换为输入流。

private void convertStream(String encoding, ZipInputStream in) throws IOException,
UnsupportedEncodingException
{
final int BUFFER = 1;
@SuppressWarnings("unused")
int count = 0;
byte data[] = new byte[BUFFER];
while ((count = in.read(data, 0, BUFFER)) != -1)
{
// How can I convert data to InputStream here ?
}
}

最佳答案

关于java - 如何将 ZipInputStream 转换为 InputStream?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7853972/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com