code: 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);
          }
      }
docs: Unserialize a destination from the given stream