|
|
@ -15,6 +15,7 @@ |
|
|
|
*/ |
|
|
|
package com.corundumstudio.socketio.parser; |
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
@ -23,7 +24,14 @@ import org.jboss.netty.util.CharsetUtil; |
|
|
|
public class Packet { |
|
|
|
|
|
|
|
public static final char DELIMITER = '\ufffd'; |
|
|
|
public static final byte[] DELIMITER_BYTES = new String(new char[] {DELIMITER}).getBytes(CharsetUtil.UTF_8); |
|
|
|
public static final byte[] DELIMITER_BYTES;// = new String(new char[] {DELIMITER}).getBytes("UTF-8"); |
|
|
|
static { |
|
|
|
try { |
|
|
|
DELIMITER_BYTES = new String(new char[] {DELIMITER}).getBytes("UTF-8"); |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
throw new IllegalStateException(e); |
|
|
|
} |
|
|
|
} |
|
|
|
public static final byte SEPARATOR = ':'; |
|
|
|
|
|
|
|
public static final Packet NULL_INSTANCE = new Packet(null); |
|
|
|