public class Loaders
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GROCERY_FILE_IO_ERROR_MSG |
static java.lang.String |
OUTPUT_FILENAME |
static java.lang.String |
RECIPE_FILE_IO_ERROR_MSG |
Constructor and Description |
---|
Loaders() |
Modifier and Type | Method and Description |
---|---|
static GroceryList |
loadGroceriesFromFile(java.lang.String filename)
1.
|
static RecipeList |
loadRecipesFromFile(java.lang.String filename)
1.
|
static void |
write(GroceryList groceries,
java.lang.String filename)
Write the GroceryList items to the specified file.
|
public static final java.lang.String GROCERY_FILE_IO_ERROR_MSG
public static final java.lang.String RECIPE_FILE_IO_ERROR_MSG
public static final java.lang.String OUTPUT_FILENAME
public static GroceryList loadGroceriesFromFile(java.lang.String filename) throws java.io.IOException
filename
- The name of the file that contains the list of ingredients for the grocery.java.io.IOException
public static RecipeList loadRecipesFromFile(java.lang.String filename) throws java.io.IOException
filename
- The name of a file containing recipe information.java.io.IOException
public static void write(GroceryList groceries, java.lang.String filename)
the
- grocery list of ingredientsthe
- name of the file to write them to.