Returns a {@link String} consisting of chars from this stream.

<p>
This is a terminal operation.

<p>
During string creation stream elements are converted to chars using
{@code (char)} cast operation.

@return a new {@code String}
@since 0.2.1
178411
public String charsToString() {
        return collect(StringBuilder::new, (sb, c) -> sb.append((char) c), StringBuilder::append).toString();
    }
996718
public String unpackString() {
    int size = data.getInt();
    byte[] bytes = new byte[size];
    data.get(bytes);
    return new String(bytes);
  }
596924
public String contents()
    {
        StringBuffer buf = new StringBuffer();
        synchronized(buf)
        {
            for (int i=0; i <elements.size() ; i++)
            {
                Object element = elements.get(i);
                if (element==null)
                    buf.append("null");
                else 
                    buf.append(element.toString());
            }
        }
        return buf.toString();
    }
35010
public char[] toCharArray() {
        if (size == 0) {
            return ArrayUtils.EMPTY_CHAR_ARRAY;
        }
        final char chars[] = new char[size];
        System.arraycopy(buffer, 0, chars, 0, size);
        return chars;
    }
361898
public static String readString(final InputStream stream) throws IOException {
        InputStreamReader br = null;
        StringBuilder sb = new StringBuilder();
        try {
            br = new InputStreamReader(stream);

            int got;
            while (!Thread.currentThread().isInterrupted()) {
                got = br.read();
                if (got == -1) {
                    break;
                }

                sb.append((char) got);
            }
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (final IOException ex) {
                }
            }

        }

        return sb.toString();
    }
817078
public String getString()
    {
        StringBuilder sb = new StringBuilder();
        for (int ii=0;ii<marked;ii++)
        {
            sb.append(charAt(ii));
        }
        return sb.toString();
    }
1222182
public String getString( int m )
    {
        StringBuffer charbuff = new StringBuffer();
        
        for (int n = 0; n < getN(); n++)
        {
            charbuff.append(getChar(m, n));
        }
        
        return charbuff.toString().trim();
    }
77550
public static final String getString(InputStream is) throws IOException
   {
      int type = is.read();
      if (type != 1)
      {
         throw new IllegalArgumentException("Unexpected string format");
      }

      Charset charset = CharsetHelper.UTF8;
      
      int length = is.read();
      if (length == 0xFF)
      {
         length = getShort(is);
         if (length == 0xFFFE)
         {
            charset = CharsetHelper.UTF16LE;
            length = (is.read() * 2);
         }
      }

      String result;
      if (length == 0)
      {
         result = null;
      }
      else
      {
         byte[] stringData = new byte[length];         
         is.read(stringData);
         result = new String(stringData, charset);
      }
      return result;
   }
1282219
public char[] getStr() {
    char[] res = new char[this.payload.length];
    for (int i = 0; i < res.length; i++) {
      res[i] = this.payload[i];
    }
    return res;
  }
488476
public String encode() {
    // System.out.println(toJson());
    if (base64 == null)
      base64 = new String(
        Base64.getUrlEncoder().encode(toJson().toString().getBytes(StandardCharsets.UTF_8)),
        StandardCharsets.UTF_8
      );
    return base64;
  }
783650
String serializeToString() {
    final StringBuilder sb = new StringBuilder();
    sb.append(String.format("%d,%d,", numActive, keys.length));

    for (int i = 0; i < keys.length; i++) {
      if (states[i] != 0) {
        sb.append(String.format("%d,%d,", keys[i], values[i]));
      }
    }
    return sb.toString();
  }
259797
public String getString(String charset) {
    try {
      return new String(getBytes(), charset);
    }
    catch (UnsupportedEncodingException e) {
      throw new IllegalStateException(e.getMessage());
    }
  }
1056925
protected String readString(InputStream in) throws IOException {
        int length = readInt(in);
        if (length < 0) {
            return null;
        } else if (length == 0) {
            return StringUtils.EMPTY;
        } else {
            byte[] value = new byte[length];
            in.read(value);
            return StringSerializer.decode(value);
        }
    }
921866
public String toTrad(String str) {   
		char[] c = str.toCharArray();
		for (int i = 0; i < str.length(); i++) {   
			char cc = s2l.get(c[i]);
			if (cc != 0) {   
				c[i] = cc;   
			} 
		}   
		return new String(c);   
	}
499049
public String readToText() {
        Charset charset = getCharset();
        try (InputStream in = body();
             Reader reader = new InputStreamReader(in, charset)) {
            return Readers.readAll(reader);
        } catch (IOException e) {
            throw new RequestsException(e);
        } finally {
            close();
        }
    }
927459
public String readString(final String charset) throws IOException {
        byte ch;
        int cnt = 0;
        final byte [] byteArrBuff = new byte[byteBuffer.remaining()];
        while (byteBuffer.remaining() > 0 && ((ch = byteBuffer.get()) != 0)) {
            byteArrBuff[cnt++] = ch;
        }
        return new String(byteArrBuff,0,cnt);
    }
531710
public String getString() 
    {
        String string = super.getString();
        if ((string != null) && (string.length() > 0))
            string = this.decodeString(string);
        return string;
    }