Boundry stream is working more like a iterator now

This commit is contained in:
Ziver Koc 2016-07-11 23:55:47 +02:00
parent e4a5af69db
commit 739b923e1e
4 changed files with 166 additions and 91 deletions

View file

@ -119,9 +119,8 @@ public class MultipartParser implements Iterable<MultipartField>{
@Override
public boolean hasNext() {
try {
IOUtil.copyStream(buffIn, new NullWriter());
return boundaryIn.isOnBoundary();
} catch (IOException e){
return boundaryIn.hasNext();
} catch (IOException e) {
logger.log(Level.SEVERE, null, e);
}
return false;