T - the object typepublic static final class DefaultSerialization.ObjectSource<T> extends Object implements Source<T>
ObjectInput adapter implementation of Source.| Constructor and Description |
|---|
ObjectSource(ObjectInput input)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
T |
get()
Returns an object on the current source position.
|
boolean |
next()
Moves this source to the next object, and then returns
true
if and only if the next object exists. |
public ObjectSource(ObjectInput input)
input - the source ObjectInputpublic boolean next()
throws IOException
Sourcetrue
if and only if the next object exists.next in interface Source<T>true if the next object exists, otherwise falseIOException - if failed to move this cursorpublic T get() throws IOException
Sourceget in interface Source<T>IOException - if failed to load an object by I/O errorpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.