@NotThreadSafe
public class BinaryRatingPacker
extends java.lang.Object
implements java.io.Closeable
BinaryRatingDAO
.Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getRatingCount() |
static BinaryRatingPacker |
open(java.io.File file,
BinaryFormatFlag... flags)
Open a new binary rating packer.
|
static BinaryRatingPacker |
open(java.io.File file,
java.util.EnumSet<BinaryFormatFlag> flags)
Open a new binary rating packer.
|
void |
writeRating(Rating rating) |
void |
writeRatings(java.lang.Iterable<? extends Rating> ratings) |
public static BinaryRatingPacker open(java.io.File file, BinaryFormatFlag... flags) throws java.io.IOException
file
- The output file.flags
- The flags to use when creating the file.java.io.IOException
- The output exception.public static BinaryRatingPacker open(java.io.File file, java.util.EnumSet<BinaryFormatFlag> flags) throws java.io.IOException
file
- The output file.flags
- The flags to use when creating the file.java.io.IOException
- The output exception.public void writeRating(Rating rating) throws java.io.IOException
java.io.IOException
public void writeRatings(java.lang.Iterable<? extends Rating> ratings) throws java.io.IOException
java.io.IOException
public int getRatingCount()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException