code: 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;
     }
docs: Read a Synchro string from an input stream.
  
  @param is input stream
  @return String instance