code: @Override
      public void writeString(String string) {
          writeAMF3();
          buf.put(AMF3.TYPE_STRING);
          if ("".equals(string)) {
              putInteger(1);
          } else {
              final byte[] encoded = encodeString(string);
              putString(string, encoded);
          }
      }
docs: {@inheritDoc}