Class ByteSourceWrapper
java.lang.Object
org.apache.shiro.lang.util.ByteSourceWrapper
- All Implemented Interfaces:
Closeable,AutoCloseable
To use try-with-resources idiom, this class supports wrapping existing ByteSource
object or byte array. At end of try block, it gets zeroed out automatically.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()byte[]getBytes()static ByteSourceWrapperThis method generically accepts byte array or ByteSource instance.
-
Method Details
-
wrap
This method generically accepts byte array or ByteSource instance. -
getBytes
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-