cmppwriter.java

来自「移动CMPP的网关,JAVA又一实现,非常完整的代码.」· Java 代码 · 共 44 行

JAVA
44
字号
/*
 * Created on Mar 17, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.grail.comm.cmpp;

import java.io.IOException;
import java.io.OutputStream;

import com.grail.comm.cmpp.message.CMPPMessage;
import com.grail.comm.core.PMessage;
import com.grail.comm.core.PWriter;

/**
 * @author eclipse
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class CMPPWriter extends PWriter
{

    protected OutputStream out;

    public CMPPWriter(OutputStream out)
    {
        this.out = out;
    }

    public void write(PMessage message)
        throws IOException
    {
        CMPPMessage msg = (CMPPMessage)message;
        out.write(msg.getBytes());
    }

    public void writeHeartbeat()
        throws IOException
    {
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?