public static ByteArrayEntity createExceptionByteArray ( String name , byte [ ] byteArray , ResourceType type ) { ByteArrayEntity result = null ; if ( byteArray != null ) { result = new ByteArrayEntity ( name , byteArray , type ) ; Context . getCommandContext ( ) . getByteArrayManager ( ) . insertByteArray ( result ) ; } return result ; }
create ByteArrayEntity with specified name and payload and make sure it s persisted