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 ObjectInput
public boolean next() throws IOException
Source
true
if and only if the next object exists.next
in interface Source<T>
true
if the next object exists, otherwise false
IOException
- if failed to move this cursorpublic T get() throws IOException
Source
get
in interface Source<T>
IOException
- if failed to load an object by I/O errorpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.