Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add support of base64 in bufferbyte
  • Loading branch information
code-challenge-reece committed Dec 13, 2020
commit 0c9242d429639bcfe208e15b9816426f5c1bc8e7
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ class FileBox(options: FileBoxOptions) {
}

fun toJsonString(): String {
buffer = toByte(this)
buffer = getBufferByte(this)

return JsonUtils.write(this)

}

fun toByte(fileBox: FileBox): ByteArray? {
fun getBufferByte(fileBox: FileBox): ByteArray? {
when (fileBox.type()) {
FileBoxType.File -> {

Expand All @@ -153,11 +153,12 @@ class FileBox(options: FileBoxOptions) {
return FileUtils.readFileToByteArray(file)

}

FileBoxType.Url -> {
return null;
}

FileBoxType.Base64 -> {
return null;
}
else -> {
TODO()
}
Expand Down