View Javadoc

1   /*
2    * Copyright 2005,2009 Ivan SZKIBA
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.ini4j;
17  
18  import java.io.File;
19  import java.io.IOException;
20  import java.io.InputStream;
21  import java.io.OutputStream;
22  import java.io.Reader;
23  import java.io.Writer;
24  
25  import java.net.URL;
26  
27  public interface Persistable
28  {
29      File getFile();
30  
31      void setFile(File value);
32  
33      void load() throws IOException, InvalidFileFormatException;
34  
35      void load(InputStream input) throws IOException, InvalidFileFormatException;
36  
37      void load(Reader input) throws IOException, InvalidFileFormatException;
38  
39      void load(File input) throws IOException, InvalidFileFormatException;
40  
41      void load(URL input) throws IOException, InvalidFileFormatException;
42  
43      void store() throws IOException;
44  
45      void store(OutputStream output) throws IOException;
46  
47      void store(Writer output) throws IOException;
48  
49      void store(File output) throws IOException;
50  }