4

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.

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

prod() is a method which going to return the values. It is giving me an error ByteArrayInputStream cannot be resolved to a type. Please advise.

4

1 回答 1

10

ByteArrayInputStream从包中导入,java.io以便应用程序可以使用不合格的类:

import java.io.ByteArrayInputStream;
于 2013-06-17T16:24:05.750 回答