io.github.binaryfoo.cmdline.DecodedWriter.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of emv-bertlv Show documentation
Show all versions of emv-bertlv Show documentation
Some decoders for the data used in EMV credit card transactions.
package io.github.binaryfoo.cmdline
import io.github.binaryfoo.DecodedData
import java.io.PrintStream
public class DecodedWriter(private val out: PrintStream) {
public fun write(decoded: List, indent: String) {
for (d in decoded) {
out.print(indent)
if (d.rawData.length() > 0) {
out.print("[")
out.print(d.rawData)
out.print("] ")
}
out.print(d.getDecodedData())
out.print("\n")
write(d.children, indent + " ")
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy