Class JwetMultipartSplitter
java.lang.Object
co.ankatech.ankasecure.sdk.internal.util.JwetMultipartSplitter
Multipart splitter for streaming JWET files
The utility extracts the detached JWET header and the proprietary
envelope from the multipart file emitted by /stream/encrypt.
The caller specifies the concrete header model class
(JwetGeneralJsonHeaderDecrypt,
JwetGeneralJsonHeaderReencrypt, …); the method returns a
strongly-typed JwetMultipartSplitter.Parts instance.
No backwards-compatibility shims are retained — migrate existing
code to split(Path, Class).
- Version:
- 2.0
- Author:
- ANKATech Solutions INC
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classHolder for the two extracted parts. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> JwetMultipartSplitter.Parts<T> Splits a multipart file into its logical parts and parses the JWET header into the requested model class.
-
Method Details
-
split
public static <T> JwetMultipartSplitter.Parts<T> split(Path file, Class<T> headerClass) throws IOException, co.ankatech.secure.client.invoker.ApiException Splits a multipart file into its logical parts and parses the JWET header into the requested model class.- Type Parameters:
T- compile-time type of the header- Parameters:
file- multipart file produced by/stream/encryptheaderClass- concrete OpenAPI-generated class (e.g.JwetGeneralJsonHeaderDecrypt.class)- Returns:
JwetMultipartSplitter.Partscontaining the typed header and a temporary file with the binary envelope- Throws:
co.ankatech.secure.client.invoker.ApiException- if the multipart structure is malformed or the header fails schema validationIOException- on any I/O error
-