I am guessing you are using a FileItemIterator to iterate the items in the request. The iterators next() method returns a FileItemStream (not a FileItem). Open the stream on that object and turn it into a string like this:
import org.apache.commons.fileupload.util.Streams;
...
FileItemStream item = iterator.next();
InputStream stream = item.openStream();
String name = item.getFieldName();
String value = Streams.asString(stream);
The getString method suggested by other answers is a method on the FileItem interface.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…