/* (non-Javadoc)
@see net.timewalker.ffmq4.network.packet.AbstractPacket#unserializeFrom(net.timewalker.ffmq4.utils.RawDataInputStream)
326877
@Override
	protected void unserializeFrom(RawDataBuffer in)
    {
        super.unserializeFrom(in);
        consumerId = new IntegerID(in.readInt());
        destination = DestinationSerializer.unserializeFrom(in);
        messageSelector = in.readNullableUTF();
        noLocal = in.readBoolean();
    }
1048919
public static DestinationRef unserializeFrom( RawDataBuffer in )
    {
        int type = in.readByte();
        if (type == NO_DESTINATION)
        	return null;
        
        String destinationName = in.readUTF();        
        switch (type)
        {
        	case TYPE_QUEUE : return new QueueRef(destinationName);
        	case TYPE_TOPIC : return new TopicRef(destinationName);
        	default:
        		throw new IllegalArgumentException("Unsupported destination type : "+type);
        }
    }
853596
@Override
	protected void serializeTo(RawDataBuffer out)
    {
        super.serializeTo(out);
        MessageSerializer.serializeTo(message, out);
    }
795460
public static FilterStreamType unserialize(String str)
    {
        if (str == null) {
            return null;
        }

        String wikiType = str;
        String data = null;
        String version = null;

        // Version

        int versionIndex = str.lastIndexOf('/');

        if (versionIndex == 0) {
            throw new IllegalArgumentException("'/' is invalid as first character: " + str);
        }

        if (versionIndex != -1) {
            version = wikiType.substring(versionIndex + 1);
            wikiType = wikiType.substring(0, versionIndex);
        }

        // Data

        int dataIndex = str.indexOf('+');

        if (dataIndex == 0) {
            throw new IllegalArgumentException("'+' is invalid as first character: " + str);
        }

        if (dataIndex != -1) {
            data = wikiType.substring(dataIndex + 1);
            wikiType = wikiType.substring(0, dataIndex);
        }

        return new FilterStreamType(SystemType.unserialize(wikiType), data, version);
    }
1193670
@Override
	protected void unserializeFrom(RawDataBuffer in)
    {
        super.unserializeFrom(in);
        consumerId = new IntegerID(in.readInt());
        topic = (Topic)DestinationSerializer.unserializeFrom(in);
        messageSelector = in.readNullableUTF();
        noLocal = in.readBoolean();
        name = in.readUTF();
    }
795719
@SuppressWarnings("unchecked")
    public static <T> T deserialize(final byte[] data) {
        if (data == null) {
            return null;
        }
        try (final ByteArrayInputStream bais = new ByteArrayInputStream(data)) {
            final ObjectInputStream in = new ObjectInputStream(bais);
            return (T) in.readObject();
        } catch (final ClassNotFoundException ex) {
            throw new RuntimeException(ex);
        } catch (final IOException ex) {
            throw new RuntimeException(ex);
        }
    }
606026
public static void serializeTo( AbstractPacket packet , RawDataBuffer out )
    {
        out.writeByte(packet.getType());
        packet.serializeTo(out);
    }
1101610
private Unmarshaller getUnMarshaller(final MarshallerFactory marshallerFactory, final ClassResolver classResolver)
            throws IOException {
        final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration();
        marshallingConfiguration.setVersion(2);
        marshallingConfiguration.setClassResolver(classResolver);
        return marshallerFactory.createUnmarshaller(marshallingConfiguration);
    }
22241
@Override
	public T deserialize(byte[] message) {
		if (dis != null) {
			dis.setBuffer(message);
		} else {
			dis = new DataInputDeserializer(message);
		}

		try {
			return serializer.deserialize(dis);
		}
		catch (IOException e) {
			throw new RuntimeException("Unable to deserialize message", e);
		}
	}
1307463
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();

    try {
      serialization = serializationClass.newInstance();
    } catch (IllegalAccessException | InstantiationException e) {
      throw new RuntimeException(
          "Failed to deserialize " + HadoopSerializationCoder.class.getSimpleName());
    }
  }
142136
public final void serialize(OutputStream out) throws IOException {
        out.write(Jackson.toJsonString(this).getBytes(UTF8));
        out.flush();
    }
999257
protected void unsetSerializationService(ServiceReference<SerializationService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "unsetSerializationService", "unsetting " + ref);
        }
        serializationServiceRef.unsetReference(ref);
    }
1068378
public static Object deserialize(byte[] bytes, boolean gzipOnSerialize) {
        try {
            InputStream is = new ByteArrayInputStream(bytes);
            if (gzipOnSerialize) {
                is = new GZIPInputStream(is);
            }
            ObjectInputStream in = new ObjectInputStream(is);
            Object inObj = in.readObject();
            in.close();
            return inObj;
        } catch (IOException e) {
            throw new RuntimeException(e);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
605742
@Override
	protected void serializeTo(RawDataBuffer out)
    {
        super.serializeTo(out);
        out.writeInt(sessionId.asInt());
    }
862950
@Override
  public void beforeSerialization() throws DDFException {
    super.beforeSerialization();
    mData = this.getList(mUnitType);
    mUnitTypeName = (mUnitType != null ? mUnitType.getName() : null);
  }
747023
protected final void writeSerializedBytes(ObjectManagerByteArrayOutputStream buffer) {
        buffer.write(simpleSerialVersion);
        buffer.writeInt(objectStoreIdentifier);
        buffer.writeLong(storedObjectIdentifier);
    }
346801
public function unserialize($serialized)
    {
        list($this->initialValues, $this->collectionName, $this->typeName) = unserialize($serialized);
        $this->isUnloaded = true;
    }