forked from cfsimplicity/spreadsheet-cfml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecryption.cfc
More file actions
23 lines (18 loc) · 886 Bytes
/
Copy pathdecryption.cfc
File metadata and controls
23 lines (18 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
component{
/*
I allow the POI JavaLoader instance to be maintained as the "contextLoader" and thereby used by POI objects when instantiating other POI classes. The EncryptionInfo class needs to load an EncryptionInfoBuilder class internally. For details of why this is so complex, see:
https://github.com/markmandel/JavaLoader/wiki/Switching-the-ThreadContextClassLoader
*/
function init( required javaloader,required poiFilesystem ){
variables.javaloader=javaloader;
variables.switchThreadContextClassLoader=javaloader.switchThreadContextClassLoader;
variables.poiFilesystem=poiFilesystem;
return this;
}
function loadInfo(){
return javaloader.create( "org.apache.poi.poifs.crypt.EncryptionInfo" ).init( poiFilesystem );
}
function loadInfoWithSwitchedContextLoader(){
return switchThreadContextClassLoader( "loadInfo",javaLoader.getURLClassLoader() );
}
}