Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ByteArrayInputStream cannot be resolved to a type

Tags:

java

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.

like image 211
user2444474 Avatar asked Dec 26 '22 01:12

user2444474


1 Answers

Import ByteArrayInputStream from the java.io package so that the unqualified class is available to the application:

import java.io.ByteArrayInputStream;
like image 78
Reimeus Avatar answered Jan 11 '23 23:01

Reimeus