Package util.io.stream

Examples of util.io.stream.ObjectInputStreamProcessor


      if (!settingsFile.canRead()) {
        createDefaultSearchFormSettings();
        return;
      }
      StreamUtilities.objectInputStream(settingsFile,
          new ObjectInputStreamProcessor() {
            @Override
            public void process(final ObjectInputStream inputStream)
                throws IOException {
              try {
                mSearchFormSettings = new SearchFormSettings(inputStream);
View Full Code Here


  public UserFilter(File file) throws ParserException {
    mFile = file;
    try {
      StreamUtilities.objectInputStream(file, 0x1000,
          new ObjectInputStreamProcessor() {

            @Override
            public void process(final ObjectInputStream in) throws IOException {
              in.readInt(); // version not yet used
              try {
View Full Code Here

      File filterCompFile=new File(tvbrowser.core.filters.FilterList.FILTER_DIRECTORY,"filter.comp");

      if (filterCompFile.exists() && filterCompFile.isFile()) {
        StreamUtilities.objectInputStreamIgnoringExceptions(filterCompFile,
          0x1000, new ObjectInputStreamProcessor() {

          @Override
            public void process(final ObjectInputStream in) throws IOException {
              in.readInt(); // version not yet used
              int compCnt = in.readInt();
View Full Code Here

        }
       
        File data = new File(Plugin.getPluginManager().getTvBrowserSettings().getTvBrowserUserHome()  + File.separator +
                "CaptureDevices" + File.separator + filename);
        StreamUtilities.objectInputStreamIgnoringExceptions(data, 0x2000,
        new ObjectInputStreamProcessor() {

          @Override
          public void process(final ObjectInputStream inputStream) throws IOException {
            try {
              dev.readData(inputStream, false);
View Full Code Here

    try {

      File newFile = new File(Settings.getUserSettingsDirName(), DATAFILE_NAME);

      if (newFile.exists()) {
        StreamUtilities.objectInputStream(newFile, 0x4000, new ObjectInputStreamProcessor() {

          @Override
          public void process(ObjectInputStream inputStream) throws IOException {
            try {
              readData(inputStream);
View Full Code Here

  private void tryToReadDataFromPreviousVersions() {
    boolean oldDataRead = false;
    try {
      File nodeFile = new File(Settings.getUserSettingsDirName(), "java.reminderplugin.ReminderPlugin.node");
      if (nodeFile.exists()) {
        StreamUtilities.objectInputStream(nodeFile, 0x4000, new ObjectInputStreamProcessor() {

          @Override
          public void process(ObjectInputStream inputStream) throws IOException {
            try {
              readReminderFromTVBrowser21and20(inputStream);
            } catch (ClassNotFoundException e) {
              mLog.log(Level.WARNING, "Could not read data from previous version", e);
            }
          }
        });
        oldDataRead = true;
        nodeFile.delete();
      }
      File datFile = new File(Settings.getUserSettingsDirName(), "java.reminderplugin.ReminderPlugin.dat");
      if (datFile.exists()) {
        if (!oldDataRead) {
          StreamUtilities.objectInputStream(datFile, 0x4000, new ObjectInputStreamProcessor() {

            @Override
            public void process(ObjectInputStream inputStream) throws IOException {
              try {
                readReminderFromBeforeTVBrowser20(inputStream);
View Full Code Here

    File nodeFile = new File(Settings.getUserSettingsDirName(), getId()
        + ".node");
    if (nodeFile.canRead()) {
      try {
        StreamUtilities.objectInputStream(nodeFile,
            new ObjectInputStreamProcessor() {
              public void process(ObjectInputStream inputStream)
                  throws IOException {
                node.load(inputStream);
                inputStream.close();
              }
View Full Code Here

        WINDOW_SETTINGS_FILE);

    if (windowSettingsFile.isFile() && windowSettingsFile.canRead()) {
      try {
        StreamUtilities.objectInputStream(windowSettingsFile,
            new ObjectInputStreamProcessor() {
              public void process(ObjectInputStream in) throws IOException {
                if (in.available() > 0) {
                  in.readInt(); // read version

                  int n = in.readInt(); // read number of window settings
View Full Code Here

   */
  public synchronized void readData(File file)
    throws IOException, ClassNotFoundException
  {
      StreamUtilities.objectInputStream(file, 0x10000,
        new ObjectInputStreamProcessor() {

          @Override
          public void process(final ObjectInputStream in) throws IOException {
            try {
              in.readInt(); // version
View Full Code Here

  public static void loadChannelTimeLimits() {
    File f = new File(Settings.getUserSettingsDirName(), FILENAME_CHANNEL_TIME_LIMIT);

    if (f.isFile() && f.canRead()) {
      StreamUtilities.objectInputStreamIgnoringExceptions(f,
          new ObjectInputStreamProcessor() {
            public void process(ObjectInputStream in) throws IOException {
              in.readShort(); // version

              short n = in.readShort(); // write number of channels
View Full Code Here

TOP

Related Classes of util.io.stream.ObjectInputStreamProcessor

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.