简体   繁体   English

ByteArrayInputStream无法解析为某个类型

[英]ByteArrayInputStream cannot be resolved to a type

I have method which is going return the values that are going to displayed as text string.So what i'm doing is converting to ByteArrayInputStream . 我有方法返回将显示为文本字符串的值。所以我正在做的是转换为ByteArrayInputStream

public String method() {
    inputStream = new ByteArrayInputStream(prod().getBytes());
    return method;
}

prod() is a method which going to return the values. prod()是一个返回值的方法。 It is giving me an error ByteArrayInputStream cannot be resolved to a type . 它给我一个错误ByteArrayInputStream cannot be resolved to a type Please advise. 请指教。

java.io包导入ByteArrayInputStream ,以便应用程序可以使用非限定类:

import java.io.ByteArrayInputStream;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM