Import a file of exported preference data. : BufferedInputStream « File « Java Tutorial






import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.prefs.Preferences;

public class Main {
  public static void main(String[] argv) throws Exception {
    // Create an input stream on a file
    InputStream is = new BufferedInputStream(new FileInputStream("output.xml"));

    // Import preference data

    Preferences.importPreferences(is);
  }
}








11.9.BufferedInputStream
11.9.1.BufferedInputStream
11.9.2.Buffered Stream Copier
11.9.3.Read from file with BufferedInputStream
11.9.4.Read File in String Using Java BufferedInputStream Example
11.9.5.Read File Using Java BufferedInputStream Example
11.9.6.Use buffered streams to copy a file
11.9.7.Import a file of exported preference data.
11.9.8.Save keyboard input with BufferedInputStream