Package util.io.stream

Examples of util.io.stream.ObjectOutputStreamProcessor


   * Saves the current available program configurations.
   */
  public void store() {
    File programConfigFile = new File(Settings.getUserSettingsDirName(),"programConfigurations.dat");
    StreamUtilities.objectOutputStreamIgnoringExceptions(programConfigFile,
        new ObjectOutputStreamProcessor() {
          public void process(ObjectOutputStream out) throws IOException {
            // write version
            out.writeInt(1);
            // write number of configurations
            out.writeInt(mAvailableProgramConfigurations.length);
View Full Code Here


  private void saveSearchFormSettings() {
    String home = Plugin.getPluginManager().getTvBrowserSettings()
        .getTvBrowserUserHome();
    File settingsFile = new File(home, SETTINGS_FILE);
    StreamUtilities.objectOutputStreamIgnoringExceptions(settingsFile,
        new ObjectOutputStreamProcessor() {
          public void process(ObjectOutputStream outputStream)
              throws IOException {
            mSearchFormSettings.writeData(outputStream);
          }
        });
View Full Code Here

    try {
      mRule = modifyRule(mRule, true);
      final File file = new File(
          tvbrowser.core.filters.FilterList.FILTER_DIRECTORY, mName + ".filter");
      StreamUtilities.objectOutputStream(file,
          new ObjectOutputStreamProcessor() {
            public void process(ObjectOutputStream out) throws IOException {
              out.writeInt(1); // version
              out.writeObject(mName);
              out.writeObject(mRule);
            }
View Full Code Here


  public void store() {
    File filterCompFile=new File(tvbrowser.core.filters.FilterList.FILTER_DIRECTORY,"filter.comp");
    StreamUtilities.objectOutputStreamIgnoringExceptions(filterCompFile,
        new ObjectOutputStreamProcessor() {
          public void process(ObjectOutputStream out) throws IOException {
            out.writeInt(1); // version
            out.writeInt(mComponentList.size());
            Iterator<FilterComponent> it = mComponentList.iterator();
            while (it.hasNext()) {
View Full Code Here

        }
        mCount++;
       
        File data = new File(Plugin.getPluginManager().getTvBrowserSettings().getTvBrowserUserHome()  + File.separator +
                "CaptureDevices" + File.separator + mCount + ".dat");
        StreamUtilities.objectOutputStream(data, new ObjectOutputStreamProcessor() {
      public void process(ObjectOutputStream stream) throws IOException {
        dev.writeData(stream);
        stream.close();
      }
    });
View Full Code Here

      String userDirectoryName = Settings.getUserSettingsDirName();
      File userDirectory = new File(userDirectoryName);
      File tmpDatFile = new File(userDirectory, DATAFILE_NAME + ".temp");
      File datFile = new File(userDirectory, DATAFILE_NAME);
      StreamUtilities.objectOutputStream(tmpDatFile,
          new ObjectOutputStreamProcessor() {
            public void process(ObjectOutputStream out) throws IOException {
              writeData(out);
              out.flush();
              out.close();
            }
View Full Code Here

  private void storeDayProgramSchemes(final Scheme[] schemes) {
    String home = Plugin.getPluginManager().getTvBrowserSettings().getTvBrowserUserHome();
    File schemeFile = new File(home,SCHEME_FILE_DAYPROGRAM);
    try {
      StreamUtilities.objectOutputStream(schemeFile,
          new ObjectOutputStreamProcessor() {
            public void process(ObjectOutputStream out) throws IOException {
              out.writeInt(1); // version
              out.writeInt(schemes.length);
              for (Scheme scheme : schemes) {
                out.writeObject(scheme.getName());
View Full Code Here

  private void storeQueueSchemes(final Scheme[] schemes) {
    String home = Plugin.getPluginManager().getTvBrowserSettings().getTvBrowserUserHome();
    File schemeFile = new File(home,SCHEME_FILE_QUEUE);
    try {
      StreamUtilities.objectOutputStream(schemeFile,
          new ObjectOutputStreamProcessor() {
            public void process(ObjectOutputStream out) throws IOException {
              out.writeInt(1); // version
              out.writeInt(schemes.length);
              for (Scheme scheme : schemes) {
                out.writeObject(scheme.getName());
View Full Code Here

      }
    }
   
    try {
      StreamUtilities.objectOutputStream(file,
          new ObjectOutputStreamProcessor() {
            public void process(ObjectOutputStream out) throws IOException {
              out.writeInt(1);
              out.writeObject("\n\nDon't touch this ;)\n\n");

              out.writeObject(device.getDriver().getClass().getName());
View Full Code Here

    if (node == null || node.isEmpty()) {
      f.delete();
      return;
    }
    try {
      StreamUtilities.objectOutputStream(f, new ObjectOutputStreamProcessor() {
        public void process(ObjectOutputStream out) throws IOException {
          if (node != null) {
            node.store(out);
          }
          out.close();
View Full Code Here

TOP

Related Classes of util.io.stream.ObjectOutputStreamProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.