Deserialize data
@param bytes what to deserialize
@return object
184131
@Override
    public Object deserialize(byte[] bytes) throws IOException {
        KryoHolder kryoHolder = null;
        if (bytes == null) throw new RuntimeException("bytes can not be null");
        try {
            kryoHolder = KryoPoolImpl.getInstance().get();
            kryoHolder.input.setBuffer(bytes, 0, bytes.length);//call it ,and then use input object  ,discard any array
            return kryoHolder.kryo.readClassAndObject(kryoHolder.input);
        } catch (RuntimeException e) {
            throw new RuntimeException(e);
		} finally {
			if (kryoHolder != null) {
				KryoPoolImpl.getInstance().offer(kryoHolder);
			}
			// bytes = null; // for gc
		}
    }
518214
@Override
    public Message deserialize(ByteBuffer in) throws ProtocolException, IOException {
        // A Bitcoin protocol message has the following format.
        //
        //   - 4 byte magic number: 0xfabfb5da for the testnet or
        //                          0xf9beb4d9 for production
        //   - 12 byte command in ASCII
        //   - 4 byte payload size
        //   - 4 byte checksum
        //   - Payload data
        //
        // The checksum is the first 4 bytes of a SHA256 hash of the message payload. It isn't
        // present for all messages, notably, the first one on a connection.
        //
        // Bitcoin Core ignores garbage before the magic header bytes. We have to do the same because
        // sometimes it sends us stuff that isn't part of any message.
        seekPastMagicBytes(in);
        BitcoinPacketHeader header = new BitcoinPacketHeader(in);
        // Now try to read the whole message.
        return deserializePayload(header, in);
    }
93507
def DeserializeFromDB(buffer):
        
        m = StreamManager.GetStream(buffer)
        reader = BinaryReader(m)
        c = ContractState()
        c.Deserialize(reader)

        StreamManager.ReleaseStream(m)

        return c
169567
public static String toHex(final byte[] bytes) {
        if (bytes == null) {
            return "";
        }
        StringBuffer sb = new StringBuffer(bytes.length * 2);
        for (byte b : bytes) {
            appendHex(sb, b);
        }
        return sb.toString();
    }
1104163
public static <T extends Serializable> T deserialize(byte[] bytes, boolean compressed) throws IOException, ClassNotFoundException {
        requireNonNull(bytes);

        try (ByteArrayInputStream i = new ByteArrayInputStream(bytes);
             ObjectInputStream ois = new ObjectInputStream(compressed ? new GZIPInputStream(i) : i)) {
            return (T) ois.readObject();
        }
    }
1010363
@SuppressWarnings("unchecked")
    @Override
    public final <T> T deserialize(byte[] content, Class<T> clazz) throws SerializerException {
        if (byte[].class.equals(clazz)) {
            return (T) content;
        }
        throw new SerializerException("Unable to deserialize to type '" + clazz.getName() + "'");
    }
801110
public static String toHex( byte[] bytes ) {
        StringBuffer buf = new StringBuffer();
        for( int i = 0; i < bytes.length; i++ ) {
            byte b = bytes[i];
            buf.append(toHexDigit((b >> 4) & 0x0F));
            buf.append(toHexDigit(b & 0x0F));
        }
        return buf.toString();
    }
707784
public <T> T deserialize(final ByteBuffer buffer) {
    ByteBufferInput in = new ByteBufferInput(buffer);
    Kryo kryo = borrow();
    try {
      @SuppressWarnings("unchecked")
      T obj = (T) kryo.readClassAndObject(in);
      return obj;
    } finally {
      release(kryo);
    }
  }
257798
public static final Object deserialize(byte[] bytes) throws Exception {
		if (bytes == null || bytes.length < 4) {
			return new LinkedHashMap<>();
		}

		// Try to deserialize content as Object (type-safe serialization)
		if (bytes[0] == 1) {
			try {
				ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
				bais.skip(1);
				return new ObjectInputStream(bais).readObject();
			} catch (Throwable ignored) {
			}
		}

		// Read content as JSON
		String json = new String(Arrays.copyOfRange(bytes, 1, bytes.length), StandardCharsets.UTF_8);
		return TreeReaderRegistry.getReader(null).parse(json);
	}
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);
		}
	}
1206007
public static <T> T deserialize(final byte[] inBytes, final Class<T> clazz) {
        val inputStream = new ByteArrayInputStream(inBytes);
        return deserialize(inputStream, clazz);
    }
645830
def DeserializeFromBufer(buffer, offset=0):
        
        mstream = StreamManager.GetStream(buffer)
        reader = BinaryReader(mstream)
        tx = Transaction.DeserializeFrom(reader)

        StreamManager.ReleaseStream(mstream)
        return tx
842768
protected Object jsonDeserialize(byte[] in, Class<?> cls) {
        if (in == null || in.length == 0) {
            return null;
        }
        Object res = null;
        try {
            res = JsonUtils.json2Object(new String(in, "utf-8"), cls);
        } catch (UnsupportedEncodingException e) {
            logger.error("DeSerialize object fail ", e);
        }
        return res;
    }
582561
public static Object deserialize(String str) throws IOException, ClassNotFoundException, CoderException {
	ByteArrayInputStream bais = new ByteArrayInputStream(Base64Coder.decode(str));
	return deserialize(bais);
    }
372188
public static String string(byte[] bytes) {
    if (bytes == null) {
      return null;
    }
    try {
      return new String(bytes, ENCODING);
    } catch (UnsupportedEncodingException e) {
      log.error("UnsupportedEncodingException ", e);
      throw new RuntimeException(e);
    }
  }
293705
def decode(self, bytes):
        
        value = self.type.decode(bytes)
        if self._enum is not None:
            for name, val in self._enum.items():
                if value == val:
                    value = name
                    break
        return value
1244177
public static final Object deserialize(byte[] bytes) throws Exception {
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(tc, "deserialize");

        Object o;
        try {
            ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
            ObjectInputStream oin = new ObjectInputStream(bis);
            o = oin.readObject();
            oin.close();
        } catch (IOException e) {
            FFDCFilter.processException(e, ConnectorService.class.getName(), "151");
            if (trace && tc.isEntryEnabled())
                Tr.exit(tc, "deserialize", new Object[] { toString(bytes), e });
            throw e;
        }

        if (trace && tc.isEntryEnabled())
            Tr.exit(tc, "deserialize", o == null ? null : o.getClass());
        return o;
    }