LoginData.java 559 Bytes
package com.viontech.model;

import lombok.Getter;
import lombok.Setter;

import java.nio.charset.StandardCharsets;

/**
 * .
 *
 * @author 谢明辉
 * @date 2020/8/20
 */
@Getter
@Setter
public class LoginData extends BaseModel {

    private String username;
    private String password;

    @Override
    public void decodeData() {
        this.username = new String(data, 0, 32, StandardCharsets.UTF_8).trim();
        this.password = new String(data, 32, 32, StandardCharsets.UTF_8).trim();
    }

    @Override
    public void encodeData() {

    }
}