What is the most efficient method to convert an throwable/exception's entire stack trace into a ByteBuffer (in Java)?
Specifically, I need to log the entire exception into the database. The Thread.currentThread().getStackTrace() returns a list of StackTraceElement[] array.
Then, there is a printStackTrace() method in Throwable class?