扫描仪nosuchelementexception

时间:2015-02-19 21:41:58

标签: java exception java.util.scanner

我看到人们正在关闭扫描仪并获得此信息。但在我的情况下,使用的代码是:

BlobDomain blobDomain = null;
OutputStream out = null;
try {
    blobDomain = new BlobDomain();
    out = blobDomain.getBinaryOutputStream();
    if (status != null){
        fullText = new Scanner(in).useDelimiter("\\A").next();
    }
} catch (Exception e) {
    e.printStackTrace();
} finally {
    if (out != null)
        try {
            out.close();
        } catch (IOException ioe) {
            ioe.printStackTrace();
        }
}

例外:

java.util.NoSuchElementException
    at java.util.Scanner.throwFor(Scanner.java:838)
    at java.util.Scanner.next(Scanner.java:1347)

0 个答案:

没有答案