Your code doesn't even make sense. It is like you are randomly copy and pasting code and hoping it'll match your requirement. For example, you are sending the standard string "Hello, World!", but then you are retrieving an integer if blockSize == 0, and you are also using incompatible methods.

Stop trying to hack up code, read the docs and start from scratch. Learn how every functions works before trying to use it.