org.joyqueue.network.serializer.JoyQueueMapTools Maven / Gradle / Ivy
/**
* Copyright 2019 The JoyQueue Authors.
*
* 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 org.joyqueue.network.serializer;
import io.netty.buffer.ByteBuf;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* @author dingjun
* @since 16-5-5.
*/
public class JoyQueueMapTools {
public static final Charset UTF8 = Charset.forName("UTF-8");
//public static final byte NULL_TYPE=Byte.MAX_VALUE;
public static final byte BYTE_TYPE = 1;
public static final byte SHORT_TYPE = 2;
public static final byte INT_TYPE = 4;
public static final byte LONG_TYPE = 8;
public static final byte DOUBLE_TYPE = 7;
public static final byte STRING_BYTE_TYPE = 9;
public static final byte STRING_SHORT_TYPE = 10;
public static final byte STRING_INT_TYPE = 11;
public static final byte BYTE_ARRAY_INT_TYPE = 12;
// 读取Map数据
public static Map