You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
544 B
28 lines
544 B
package mightypork.util.files.ion.templates;
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.io.OutputStream;
|
|
import java.util.HashSet;
|
|
|
|
import mightypork.util.files.ion.Ion;
|
|
import mightypork.util.files.ion.Streamable;
|
|
|
|
|
|
public abstract class StreamableHashSet<E> extends HashSet<E> implements Streamable {
|
|
|
|
@Override
|
|
public void load(InputStream in) throws IOException
|
|
{
|
|
Ion.readSequence(in, this);
|
|
}
|
|
|
|
|
|
@Override
|
|
public void save(OutputStream out) throws IOException
|
|
{
|
|
Ion.writeSequence(out, this);
|
|
}
|
|
|
|
}
|
|
|