I have a web page with random 1’s and 0’s in the body and I want to treat it as raw binary data and save it to a file.
<html>
<head>...</head>
<pre style="word-wrap: break-word; white-space: pre-wrap;">1 0 1 0 1 1 1 1 1 0</pre>
</body>
</html>
Alternatively, I can get the file in one column. If I just url.openStream() and read bytes, it spits out ascii values (49 & 48). I’m also not sure how to write one bit at a time to a file. How do I go about doing this?
This can be sent as two (base64) or three (hex) bytes, so I am assuming efficiency isn’t an issue here. 😉 Once you extract the String you can convert it with.