@Test public void callToIteratorConsumesObjectFromStream() { for (int i = 0; i < streamSize; i++) { assertThat(subject.iterator().hasNext(), is(true)); } assertThat(subject.iterator().hasNext(), is(false)); }
@Override public Iterator<T> iterator() { return inputStream == null ? Collections.emptyIterator() : new ObjectInputStreamIterator(); }
IterableObjectInputStream implements Iterable<T> { @Override public Iterator<T> iterator() { return inputStream == null ? Collections.emptyIterator() : new ObjectInputStreamIterator(); } }
IterableObjectInputStream implements Iterable<T> { @Override public Iterator<T> iterator() { return inputStream == null ? Collections.emptyIterator() : new ObjectInputStreamIterator(); } IterableObjectInputStream(ObjectInputStream<T> inputStream); }
IterableObjectInputStream implements Iterable<T> { @Override public Iterator<T> iterator() { return inputStream == null ? Collections.emptyIterator() : new ObjectInputStreamIterator(); } IterableObjectInputStream(ObjectInputStream<T> inputStream); @Override Iterator<T> iterator(); }
IterableObjectInputStream implements Iterable<T> { @Override public Iterator<T> iterator() { return inputStream == null ? Collections.emptyIterator() : new ObjectInputStreamIterator(); } IterableObjectInputStream(ObjectInputStream<T> inputStream); @Override Iterator<T> iterator();  }