We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0aea528 + 63f5d8d commit 25a4f07Copy full SHA for 25a4f07
wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt
@@ -138,13 +138,13 @@ class FileBox(options: FileBoxOptions) {
138
}
139
140
fun toJsonString(): String {
141
- buffer = toByte(this)
+ buffer = getBufferByte(this)
142
143
return JsonUtils.write(this)
144
145
146
147
- fun toByte(fileBox: FileBox): ByteArray? {
+ private fun getBufferByte(fileBox: FileBox): ByteArray? {
148
when (fileBox.type()) {
149
FileBoxType.File -> {
150
@@ -153,11 +153,12 @@ class FileBox(options: FileBoxOptions) {
153
return FileUtils.readFileToByteArray(file)
154
155
156
-
157
FileBoxType.Url -> {
158
return null;
159
160
+ FileBoxType.Base64 -> {
+ return null;
161
+ }
162
else -> {
163
TODO()
164
0 commit comments