Package javax0.license3j.io
Class LicenseReader
- java.lang.Object
- 
- javax0.license3j.io.LicenseReader
 
- 
- All Implemented Interfaces:
- java.io.Closeable,- java.lang.AutoCloseable
 
 public class LicenseReader extends java.lang.Object implements java.io.CloseableReads a license from some input.
- 
- 
Constructor SummaryConstructors Constructor Description LicenseReader(java.io.File file)LicenseReader(java.io.InputStream is)LicenseReader(java.lang.String fileName)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Licenseread()Read the license from the input assuming the license is binary formatted.Licenseread(IOFormat format)Read the license from the input assuming that the format of the license on the input has the format specified by the argument.
 
- 
- 
- 
Constructor Detail- 
LicenseReaderpublic LicenseReader(java.io.InputStream is) 
 - 
LicenseReaderpublic LicenseReader(java.io.File file) throws java.io.FileNotFoundException- Throws:
- java.io.FileNotFoundException
 
 - 
LicenseReaderpublic LicenseReader(java.lang.String fileName) throws java.io.FileNotFoundException- Throws:
- java.io.FileNotFoundException
 
 
- 
 - 
Method Detail- 
readpublic License read() throws java.io.IOException Read the license from the input assuming the license is binary formatted.- Returns:
- the license created from the file
- Throws:
- java.io.IOException- when the file cannot be read
 
 - 
readpublic License read(IOFormat format) throws java.io.IOException Read the license from the input assuming that the format of the license on the input has the format specified by the argument.- Parameters:
- format- the assumed format of the license, can be- IOFormat.STRING,- IOFormat.BASE64or- IOFormat.BINARY
- Returns:
- the license
- Throws:
- java.io.IOException- if the input cannot be read
 
 - 
closepublic void close() throws java.io.IOException- Specified by:
- closein interface- java.lang.AutoCloseable
- Specified by:
- closein interface- java.io.Closeable
- Throws:
- java.io.IOException
 
 
- 
 
-