+ fix sql
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package me.skymc.taboolib.common.serialize;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
|
||||
/**
|
||||
* @Author 坏黑
|
||||
* @Since 2019-03-08 17:28
|
||||
@@ -20,4 +23,12 @@ public interface TSerializable {
|
||||
default String write() {
|
||||
return TSerializer.write(this);
|
||||
}
|
||||
|
||||
default Object readBase64(String value) {
|
||||
return TSerializer.read(this, new String(Base64.getDecoder().decode(value), StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
default String writeBase64() {
|
||||
return Base64.getEncoder().encodeToString(TSerializer.write(this).getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user