Class HarWriter
java.lang.Object
de.sstoehr.harreader.AbstractHarIO
de.sstoehr.harreader.HarWriter
-
Nested Class Summary
Nested classes/interfaces inherited from class de.sstoehr.harreader.AbstractHarIO
AbstractHarIO.IOFunction<T,R> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]writeAsBytes(Har har) Serialize HAR as a byte array.writeAsString(Har har) Serialize HAR as a string.voidvoidwriteTo(OutputStream os, Har har) voidMethods inherited from class de.sstoehr.harreader.AbstractHarIO
getMapperFactory, wrap
-
Constructor Details
-
HarWriter
public HarWriter() -
HarWriter
-
-
Method Details
-
writeAsString
Serialize HAR as a string. It's functionally equivalent to callingwriteTo(Writer, Har)withStringWriterand constructing String, but more efficient.- Returns:
- Serialized HAR as a string
- Throws:
HarWriterException- if a low-level I/O problem occurs
-
writeAsBytes
Serialize HAR as a byte array. It's functionally equivalent to callingwriteTo(OutputStream, Har)withByteArrayOutputStreamand getting bytes, but more efficient. Encoding used will be UTF-8.- Returns:
- Serialized HAR as a byte array
- Throws:
HarWriterException- if a low-level I/O problem occurs
-
writeTo
- Throws:
HarWriterException
-
writeTo
- Throws:
HarWriterException
-
writeTo
- Throws:
HarWriterException
-