public class CompressibleRatingPreferencesFormat extends Object
Constructor and Description |
---|
CompressibleRatingPreferencesFormat() |
Modifier and Type | Method and Description |
---|---|
static CompressibleRatingPreferencesFormat |
get()
Gets an instance of this class.
|
Stream<Tuple2io<int[][]>> |
read(InputStream in)
Reads an input stream that complies with this format.
|
Stream<Tuple2io<int[][]>> |
read(String in)
Reads a file that complies with this format.
|
void |
write(FastPreferenceData<?,?> prefData,
OutputStream uo,
OutputStream io)
Saves a PreferenceData instance in two files for user and item preferences, respectively.
|
void |
write(FastPreferenceData<?,?> prefData,
String up,
String ip)
Saves a PreferenceData instance in two files for user and item preferences, respectively.
|
public static CompressibleRatingPreferencesFormat get()
public void write(FastPreferenceData<?,?> prefData, String up, String ip) throws FileNotFoundException, IOException
prefData
- preferencesup
- path to user preferences fileip
- path to item preferences fileFileNotFoundException
- one of the files could not be createdIOException
- other IO errorpublic void write(FastPreferenceData<?,?> prefData, OutputStream uo, OutputStream io) throws IOException
prefData
- preferencesuo
- stream of user preferencesio
- stream of user preferencesIOException
- when IO errorpublic Stream<Tuple2io<int[][]>> read(String in) throws FileNotFoundException
in
- path to fileFileNotFoundException
- when file does not existpublic Stream<Tuple2io<int[][]>> read(InputStream in)
in
- input streamCopyright © 2016. All rights reserved.