Package javax0.license3j.io
Class LicenseWriter
- java.lang.Object
-
- javax0.license3j.io.LicenseWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class LicenseWriter extends java.lang.Object implements java.io.Closeable
Write the license into the output
-
-
Constructor Summary
Constructors Constructor Description LicenseWriter(java.io.File file)
LicenseWriter(java.io.OutputStream os)
LicenseWriter(java.lang.String fileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
write(License license)
Write the license to the output in binary format.void
write(License license, IOFormat format)
Write the license into the output.
-
-
-
Constructor Detail
-
LicenseWriter
public LicenseWriter(java.io.OutputStream os)
-
LicenseWriter
public LicenseWriter(java.io.File file) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
LicenseWriter
public LicenseWriter(java.lang.String fileName) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
-
Method Detail
-
write
public void write(License license, IOFormat format) throws java.io.IOException
Write the license into the output.- Parameters:
license
- the license itselfformat
- the desired format of the license, can beIOFormat.STRING
,IOFormat.BASE64
orIOFormat.BINARY
- Throws:
java.io.IOException
- if the output cannot be written
-
write
public void write(License license) throws java.io.IOException
Write the license to the output in binary format.- Parameters:
license
- to write to the file- Throws:
java.io.IOException
- if the output cannot be written
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-