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