Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Equivalent for WriteInt (as in VJ++) to C#

Status
Not open for further replies.

shadowlesshand

Programmer
May 29, 2002
21
HK
Hi,

I have a VJ++ code ported to C# using JLCA.
I have a scenario as explained below.

VJ++ CODE SAYS:

private DataOutputStream dataOut = null;
output = tcpSocket.getOutputStream();
dataOut = new DataOutputStream(output);

dataOut.writeInt(command.length());
dataOut.writeBytes(command);


IN C# THERE WERE UPGRADE NOTES ADDED

//UPGRADE_TODO: Class 'java.io.DataOutputStream' was converted to 'System.IO.BinaryWriter' which has a different behavior.
"ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword=
'jlca1073_javaioDataOutputStream'"

private BinaryWriter dataOut = null;
output = tcpSocket.GetStream();

//UPGRADE_TODO: Class 'java.io.DataOutputStream' was converted to 'System.IO.BinaryWriter' which has a different behavior.
"ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?
index='!DefaultContextWindowIndex'&keyword=
'jlca1073_javaioDataOutputStream'"

dataOut = new System.IO.BinaryWriter(output);
dataOut.Write(cmd);

dataOut.Write(command);

____________________________________________________________

Can you please tell me if these conversions are valid. If not what are the equivalents.

Regards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top