code: @Override
      public String readString() {
          log.trace("readString - amf3_mode: {}", amf3_mode);
          String string;
          // check current type to ensure reading the string as AMF3 is intended
          if (currentDataType == AMF3.TYPE_STRING || amf3_mode > 0) {
              int len = readInteger();
              log.debug("readString - length: {}", len);
              // get the length of the string (0x03 = 1, 0x05 = 2, 0x07 = 3 etc..)
              // 0x01 is special and it means "empty"
              if (len == 1) {
                  // Empty string
                  return "";
              }
              if ((len & 1) == 0) {
                  //if the refs are empty an IndexOutOfBoundsEx will be thrown
                  if (refStorage.stringReferences.isEmpty()) {
                      log.debug("String reference list is empty");
                  }
                  // Reference
                  return refStorage.stringReferences.get(len >> 1);
              }
              len >>= 1;
              log.debug("readString - new length: {}", len);
              int limit = buf.limit();
              log.debug("readString - limit: {}", limit);
              final ByteBuffer strBuf = buf.buf();
              strBuf.limit(strBuf.position() + len);
              string = AMF.CHARSET.decode(strBuf).toString();
              log.debug("String: {}", string);
              buf.limit(limit); // reset the limit
              refStorage.stringReferences.add(string);
          } else {
              // read the string as AMF0
              string = super.readString();
          }
          return string;
      }
docs: Reads a string
  
  @return String String