Java字符串在Unix上被拆分

时间:2016-12-21 10:53:09

标签: java linux string unix

我正在使用“字符串”构建器来创建字符串消息。

StringBuilder outputMessage = new StringBuilder("<env:Envelope xsi:schemaLocation=\"OTC_Matching_FX_1-0       /xmls/OTC/OTC_Matching_FX_1-0.xsd  http://schemas.xmlsoap.org/soap/envelope/  /xmls/OTC/soap-envelope.xsd  http://www.fpml.org/FpML-5/confirmation    /xmls/OTC/fpml-main-5-1.xsd\" xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:fpml=\"http://www.fpml.org/FpML-5/confirmation\" xmlns:mtc=\"OTC_Matching_FX_1-0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">");

但是当这个字符串在Unix服务器上打印出来时,这一行会分成多行:

使用toString记录消息:

LOGGER.info("Output: "+outputMessage.toString());

这是Unix上的输出:

  

<env:Envelope xsi:schemaLocation="OTC_Matching_FX_1-0 /xmls/OTC/OTC_Matching_FX_1-0.xsd http://schemas.xmlsoap.org/soap/envel

     

ope/ /xmls/OTC/soap-envelope.xsd http://www.fpml.org/FpML-5/confirmation /xmls/OTC/fpml-main-5-1.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fpml="http://www.fpml.org/FpML-5/confirmation" xmlns:mtc="OTC_Matching_FX_1-0" xmlns:xsi="http://www.w3

     

.org/2001/XMLSchema-instance">

我无法理解为什么会这样。为什么字符串会在字符之间分割?

0 个答案:

没有答案