SHARE
TWEET

Untitled

a guest Feb 21st, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. byte[] content = filteredEncodedString.getBytes("utf-8");
  2. String result = new String(content,"utf-8");
  3.    
  4. URL url = new URL(currentUrl);
  5.         URLConnection conn = url.openConnection();
  6.         conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729)");
  7.         BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), getEncode()));
  8.  
  9.         String line="";
  10.         String domString="";
  11.         while((line = in.readLine()) != null) {
  12.             domString+=line.toString();
  13.         }
  14.  
  15.         byte[] bytes = domString.getBytes("UTF-8");
  16.         in.close();
  17.  
  18.         return bytes;
  19.         //return text.getBytes();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top