java.io.DataOutStream in javascript