Examples of readObject()


Examples of org.nustaq.serialization.FSTObjectInput.readObject()

                FST.registerSerializer(Bug34.NonSerializableClass.class, new Serializer(), false);
                FSTObjectOutput out = FST.getObjectOutput();
                out.writeObject(new Bug34.NonSerializableClass());

                FSTObjectInput in = FST.getObjectInput(out.getCopyOfWrittenBuffer());
                assertEquals(NonSerializableClass.class, in.readObject().getClass());
        }

        private static class Serializer extends FSTBasicObjectSerializer {

                @Override
View Full Code Here

Examples of org.openbp.common.classloader.ClassLoaderObjectInputStream.readObject()

        // Setup an object input stream.
        ClassLoaderObjectInputStream ois = new ClassLoaderObjectInputStream(new ByteArrayInputStream(bytes));
        ois.setClassLoader(classLoader);

        // Create a new token context and deserialize it from the stream
        newObject = ois.readObject();
      }
      catch (IOException e)
      {
        ExceptionUtil.printTrace(e);
        throw new CloneNotSupportedException("Cannot clone object of type '" + object.getClass().getName() + "'");
View Full Code Here

Examples of org.openide.util.io.NbObjectInputStream.readObject()

    private IngestModuleIngestJobSettings loadJobSettings(IngestModuleFactory factory) {
        IngestModuleIngestJobSettings settings = null;
        File settingsFile = new File(getModuleSettingsFilePath(factory));
        if (settingsFile.exists()) {
            try (NbObjectInputStream in = new NbObjectInputStream(new FileInputStream(settingsFile.getAbsolutePath()))) {
                settings = (IngestModuleIngestJobSettings) in.readObject();
            } catch (IOException | ClassNotFoundException ex) {
                String logMessage = String.format("Error loading ingest job settings for %s module for %s context, using defaults", factory.getModuleDisplayName(), launcherContext); //NON-NLS
                logger.log(Level.WARNING, logMessage, ex);
            }
        }
View Full Code Here

Examples of org.pentaho.reporting.libraries.serializer.SerializerHelper.readObject()

  private void readObject(final ObjectInputStream in)
      throws IOException, ClassNotFoundException
  {
    in.defaultReadObject();
    final SerializerHelper helper = SerializerHelper.getInstance();
    scaleValuePaint = (Paint) helper.readObject(in);
    rangePaint = (Paint) helper.readObject(in);
    fillPaint = (Paint) helper.readObject(in);
    outlineStroke = (Stroke) helper.readObject(in);
    defaultShape = (Shape) helper.readObject(in);
    tickMarkPaint = (Paint) helper.readObject(in);
View Full Code Here

Examples of org.prevayler.foundation.ObjectInputStreamWithClassLoader.readObject()

    objects.close();
  }

  public Object readObject(InputStream stream) throws IOException, ClassNotFoundException {
    ObjectInputStream objects = new ObjectInputStreamWithClassLoader(stream, _loader);
    Object object = objects.readObject();
    objects.close();
    return object;
  }

}
View Full Code Here

Examples of org.prevayler.foundation.serialization.Serializer.readObject()

        snapshotFile.toString() + " cannot be read; only " + _strategies.keySet().toString() + " supported");

    Serializer serializer = (Serializer) _strategies.get(suffix);
    FileInputStream in = new FileInputStream(snapshotFile);
    try {
      return (P) (serializer.readObject(in));
    } finally {
      in.close();
    }
  }
View Full Code Here

Examples of org.quickconnectfamily.json.JSONInputStream.readObject()

      JSONInputStream jsonIn = new JSONInputStream(new FileInputStream(multiObjectFile));

      /*
       * Read the first object from the file
       */
      Object aPossibleMap = jsonIn.readObject();
      assertEquals(HashMap.class, aPossibleMap.getClass());
      HashMap aMap = (HashMap)aPossibleMap;
      assertEquals("Bob", aMap.get("name"));
      assertEquals((long)27, aMap.get("age"));
     
View Full Code Here

Examples of org.red5.io.object.Input.readObject()

        if (object == DataTypes.CORE_MAP) {
          // the params are sent as a Mixed-Array. Required to support the RTMP publish provided by ffmpeg/xuggler
          params = (Map<Object, Object>) input.readMap(null);
        } else {
          // read the params as a standard object
          params = (Map<Object, Object>) input.readObject(Object.class);
        }
        log.debug("Dataframe: {} params: {}", onCueOrOnMeta, params.toString());

        IoBuffer buf = IoBuffer.allocate(1024);
        buf.setAutoExpand(true);
View Full Code Here

Examples of org.richfaces.util.LookAheadObjectInputStream.readObject()

    public static Object decodeObjectData(String encodedData) {
        byte[] objectArray = decodeBytesData(encodedData);

        try {
            ObjectInputStream in = new LookAheadObjectInputStream(new ByteArrayInputStream(objectArray));
            return in.readObject();
        } catch (StreamCorruptedException e) {
            RESOURCE_LOGGER.error(Messages.getMessage(Messages.STREAM_CORRUPTED_ERROR), e);
        } catch (IOException e) {
            RESOURCE_LOGGER.error(Messages.getMessage(Messages.DESERIALIZE_DATA_INPUT_ERROR), e);
        } catch (ClassNotFoundException e) {
View Full Code Here

Examples of org.teiid.core.util.ObjectInputStreamWithClassloader.readObject()

    // only for top level we would have the contents as not null.
    if (contents != null) {
      ByteArrayInputStream bais = new ByteArrayInputStream(contents);
      try {
        ObjectInputStream ois = new ObjectInputStreamWithClassloader(bais, ExceptionHolder.class.getClassLoader());
        return (Throwable)ois.readObject();
      } catch (Exception e) {
        //
      }
    }
    return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.