我试图通过网络连接发送 iso8583 数据,目前当我发送数据时,它在 TCP 查看器中显示为一个长字符串
但它应该看起来像这样
0000(0000) 30 38 30 30 82 38 00 00 00 00 00 00 04 00 00 00 0800.8..........
0016(0010) 00 00 00 00 30 38 32 34 31 30 35 31 30 30 31 33 ....082410510013
0032(0020) 35 31 30 30 31 33 35 31 30 30 30 38 32 34 33 30 5100135100082430
0048(0030) 31 1
我发送数据的代码
Socket plug = new Socket(Config.getServerIP(), Config.getServerPort());
DataInputStream In= new DataInputStream(plug.getInputStream());
PrintWriter Out = new PrintWriter(plug.getOutputStream());
String Indata, Outdata;
Outdata =" ";
Indata = "NOTHING";
while (!Outdata.equals("Bye"))
{
Outdata=message;
Out.write(Outdata);
Out.flush();
if (!Outdata.equals("Bye"))
{
Indata=In.readLine();
System.out.println(Indata);
}
}
In.close();
Out.close();
数据是否必须以特定方式发送?非常感谢任何帮助。