// Path: Java/Blink/library/src/net/qiujuer/blink/core/PacketType.java
// public class PacketType {
//     public final static byte STRING = 1;
//     public final static byte BYTES = 2;
//     public final static byte FILE = 3;
// }
// 
// Path: Java/Blink/library/src/net/qiujuer/blink/core/listener/SendListener.java
// public interface SendListener {
// 
//     /**
//      * On start send the packet call
//      *
//      * @param packet SendPacket
//      */
//     void onSendStart(SendPacket packet);
// 
// 
//     /**
//      * On the packet send progress changed call
//      *
//      * @param packet   SendPacket
//      * @param progress Progress (0~1)
//      */
//     void onSendProgress(SendPacket packet, float progress);
// 
//     /**
//      * On send completed call
//      *
//      * @param packet SendPacket
//      */
//     void onSendCompleted(SendPacket packet);
// }


import java.io.ByteArrayInputStream;
import net.qiujuer.blink.core.PacketType;
import net.qiujuer.blink.core.listener.SendListener;
/*
 * Copyright (C) 2014 Qiujuer <qiujuer@live.cn>
 * WebSite http://www.qiujuer.net
 * Created 04/16/2015
 * Changed 04/19/2015
 * Version 1.0.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.qiujuer.blink.box;



/**
 * Bytes send class
 */
public class ByteSendPacket extends BaseSendPacket<byte[]> {
    public ByteSendPacket(byte[] entity) {
        this(entity, null);
    }

    public ByteSendPacket(byte[] entity, SendListener listener) {
// Path: Java/Blink/library/src/net/qiujuer/blink/core/PacketType.java
// public class PacketType {
//     public final static byte STRING = 1;
//     public final static byte BYTES = 2;
//     public final static byte FILE = 3;
// }
// 
// Path: Java/Blink/library/src/net/qiujuer/blink/core/listener/SendListener.java
// public interface SendListener {
// 
//     /**
//      * On start send the packet call
//      *
//      * @param packet SendPacket
//      */
//     void onSendStart(SendPacket packet);
// 
// 
//     /**
//      * On the packet send progress changed call
//      *
//      * @param packet   SendPacket
//      * @param progress Progress (0~1)
//      */
//     void onSendProgress(SendPacket packet, float progress);
// 
//     /**
//      * On send completed call
//      *
//      * @param packet SendPacket
//      */
//     void onSendCompleted(SendPacket packet);
// }


// Path: Java/Blink/library/src/net/qiujuer/blink/box/ByteSendPacket.java
import java.io.ByteArrayInputStream;
import net.qiujuer.blink.core.PacketType;
import net.qiujuer.blink.core.listener.SendListener;

/*
 * Copyright (C) 2014 Qiujuer <qiujuer@live.cn>
 * WebSite http://www.qiujuer.net
 * Created 04/16/2015
 * Changed 04/19/2015
 * Version 1.0.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.qiujuer.blink.box;



/**
 * Bytes send class
 */
public class ByteSendPacket extends BaseSendPacket<byte[]> {
    public ByteSendPacket(byte[] entity) {
        this(entity, null);
    }

    public ByteSendPacket(byte[] entity, SendListener listener) {
        super(entity, PacketType.BYTES, listener);