Implement availableSizeImpl native

In some Connection natives, I was using a local "byteArray" variable. Since I was touching Connection-related code, I've removed this byteArray variable and directly used util.decodeUtf8 instead.