关于串口接收数据出现“0A= 0D 0A”的有关问题

关于串口接收数据出现“0A= 0D 0A”的问题?
我在使用JAVA编程进行串口通讯时发现了一个问题——就是只要数据中存在0x0A时,在windows操作系统下0x0A前会多出一个0x0D;而在linux下0x0A前会多出一个0x0A,而且如果有0x0D这个数的话,系统会强行把0x0D变成0x0A,我试过用字符、字符串和字节的形式发送都不行。用DataOutputStream、OutputStream、OutputStreamWriter发送都不行。那位大虾帮帮忙解决一下,感激不尽!

------解决方案--------------------
没搞过串口编程。。。。
标记学习。。。
------解决方案--------------------
你具体发的什么收的什么啊
我怎么没有碰到这个情况啊
明天去公司看看
呵呵
先占的地方
------解决方案--------------------
没遇到过,不过是否所有的都是这样,还是只是你刚好碰到一些例外(可能是逻辑流程某些部分影响),最好你弄个测试程序出来,如果问题依然一样请贴代码出来,不然……
------解决方案--------------------
我用的是
OutputStream out;
out = serialPort.getOutputStream();
out.Write(HexString);
没什么问题啊
win xp系统

没有linux环境
------解决方案--------------------
Java code

package send;

public class SerialBuffer
{
    public String Content = "";
    private String CurrentMsg;
    private boolean available = false;
    private int LengthNeeded = 2;
    public boolean isTimeOut=false;

    public synchronized String getMsg(long timeOut)//获得所读取的前两个字符
    {
        while (Content.equals("")||Content==null)
        {
            try
            {
            wait(timeOut);
            }catch(InterruptedException e){
                e.printStackTrace();
            }
            if(Content.equals("")||Content==null)
            {
                isTimeOut=true;
                Content="aa";
            }
            else
            {
                break;
            }
        }
        CurrentMsg = Content.substring(0, LengthNeeded);
        Content = Content.substring(LengthNeeded, Content.length());
        notifyAll();
        return CurrentMsg;
    }

    public synchronized void putChar(int c)//得到串口读过来的数据存到字符变量中
    {
        String t="";
        t=Integer.toHexString(c);
        if(t.length()<2)
        {
            t="0"+t;
        }
        Content = Content.concat(t);
        if (LengthNeeded < Content.length())
        {
            available = true;
        }
        notifyAll();
    }
    public synchronized void cleanBuff()
    {
        Content="";
        notifyAll();
    }public synchronized boolean getIsTimeOut()
    {
        notifyAll();
        return isTimeOut;
    }
}

------解决方案--------------------
是windows和Linux下的回车换行的问题, 0D 0A是标准的回车换行符
------解决方案--------------------
探讨
是windows和Linux下的回车换行的问题, 0D 0A是标准的回车换行符