I have a hasNext () method to read a file. It returns true if it is not the end of the file. In this method, it has an exception.
Exception Information:
My hasNext () method:
@Override public boolean hasNext() { try { super.getSourceRead().mark(1); if (super.getSourceRead().read() < 0) { return false; } getSourceRead().reset(); return true; } catch (IOException e) { Logger.exceptionOccurred(e); return false; } catch (NullPointerException e) { Logger.exceptionOccurred(e); return false; } }
Well, as written in the doc for 1.5 :
After reading these many characters , when trying to reset the thread may fail.
So, in your case, he says that he may fail after reading 1 character.
2 .
, : , - (, :))
Source: https://habr.com/ru/post/1545372/More articles:How to create a triangle shape clip template using CSS - html5How to check if a dynamic property exists - c ++Matplotlib color panel for PatchCollection overrides colors - pythonHow to compress video file on iphone - iosThe variable is null in a super call - javaКак вызвать/вызывать fsc, компилятор F #, из FAKE? - f#Storing variables and dereferencing them - cHow can we store any text language (English, Hindi, Spanish etc) and extract the same value from the database - javaOpen random port - dockerIs there any quick algorithm to calculate log2 for numbers that have cardinality 2? - cAll Articles