Package util.io.stream

Examples of util.io.stream.ObjectOutputStreamProcessor


    // save the plugin data in a temp file
    File tmpDatFile = new File(userDirectory, getId() + ".dat.temp");
    try {
      StreamUtilities.objectOutputStream(tmpDatFile,
          new ObjectOutputStreamProcessor() {
            public void process(ObjectOutputStream out) throws IOException {
              mPlugin.writeData(out);
              out.close();
            }
          });
View Full Code Here


   */
  private static void storeWindowSettings() {
    File windowSettingsFile = new File(Settings.getUserSettingsDirName(),
        WINDOW_SETTINGS_FILE);
    StreamUtilities.objectOutputStreamIgnoringExceptions(windowSettingsFile,
        new ObjectOutputStreamProcessor() {
          public void process(ObjectOutputStream out) throws IOException {
            out.writeInt(1); // write version

            out.writeInt(mWindowSettings.size());

View Full Code Here

   * @throws IOException
   *
   * @see #readData(File)
   */
  public synchronized void writeData(File file) throws IOException {
    StreamUtilities.objectOutputStream(file, new ObjectOutputStreamProcessor() {
      public void process(ObjectOutputStream out) throws IOException {
        out.writeInt(1); // version

        out.writeInt(mInventoryHash.size());
        Iterator<String> iter = mInventoryHash.keySet().iterator();
View Full Code Here

    File tmpDatFile = new File(userDirectory, mFilePrefix + ".dat.temp");
    File datFile = new File(userDirectory, "java." + mFilePrefix + ".dat");

    StreamUtilities.objectOutputStream(tmpDatFile,
        new ObjectOutputStreamProcessor() {
          public void process(ObjectOutputStream out) throws IOException {
            serializer.write(out);
            out.close();
          }
        });
View Full Code Here

   * @since 2.2.4/2.6
   */
  public static void storeChannelTimeLimits() {
    File f = new File(Settings.getUserSettingsDirName(), FILENAME_CHANNEL_TIME_LIMIT);
    StreamUtilities.objectOutputStreamIgnoringExceptions(f,
        new ObjectOutputStreamProcessor() {
          public void process(ObjectOutputStream out) throws IOException {
            out.writeShort(1); // version

            Channel[] channels = getSubscribedChannels();

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.