added some javadocs

This commit is contained in:
Jochen Stärk
2019-08-24 15:47:23 +02:00
parent cf927ed248
commit 49bf243f37
2 changed files with 10 additions and 12 deletions

View File

@@ -135,15 +135,15 @@ public class ZUGFeRDExporter implements Closeable {
* @param filename * @param filename
* @param filecontent * @param filecontent
*/ */
public void addAdditionalFile(String filename, byte[] xml) { public void addAdditionalFile(String filename, byte[] filecontent) {
additionalFiles.put(filename, xml); additionalFiles.put(filename, filecontent);
} }
/*** /***
* internal helper function: get namespace for given zugferd or factur-x version * internal helper function: get namespace for given zugferd or factur-x version
* @param ver * @param ver the ZUGFeRD version
* @return * @return the URN of the namespace
*/ */
public String getNamespaceForVersion(int ver) { public String getNamespaceForVersion(int ver) {
if (isFacturX) { if (isFacturX) {
@@ -160,8 +160,8 @@ public class ZUGFeRDExporter implements Closeable {
/*** /***
* internal helper: returns the namespace prefix for the given zf/fx version number * internal helper: returns the namespace prefix for the given zf/fx version number
* @param ver * @param ver the zf/fx version
* @return * @return the namespace prefix as string, without colon
*/ */
public String getPrefixForVersion(int ver) { public String getPrefixForVersion(int ver) {
if (isFacturX) { if (isFacturX) {
@@ -173,8 +173,8 @@ public class ZUGFeRDExporter implements Closeable {
/*** /***
* internal helper: return the name of the file attachment for the given zf/fx version * internal helper: return the name of the file attachment for the given zf/fx version
* @param ver * @param ver the zf/fx version
* @return * @return the filename of the file to be embedded
*/ */
public String getFilenameForVersion(int ver) { public String getFilenameForVersion(int ver) {
if (isFacturX) { if (isFacturX) {

View File

@@ -38,9 +38,6 @@ import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.XPath; import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory; import javax.xml.xpath.XPathFactory;
@@ -186,7 +183,7 @@ public class ZUGFeRDImporter {
/** /**
* Skips over a BOM at the beginning of the given ByteArrayInputStream, if one exists. * Skips over a BOM at the beginning of the given ByteArrayInputStream, if one exists.
* @param is the ByteArrayInputStream used * @param is the ByteArrayInputStream used
* @throws IOException * @throws IOException if can not be read from is
* @see <a href="https://www.w3.org/TR/xml/#sec-guessing">Autodetection of Character Encodings</a> * @see <a href="https://www.w3.org/TR/xml/#sec-guessing">Autodetection of Character Encodings</a>
*/ */
private int guessBOMSize(ByteArrayInputStream is) throws IOException { private int guessBOMSize(ByteArrayInputStream is) throws IOException {
@@ -335,6 +332,7 @@ public class ZUGFeRDImporter {
/** /**
* @param meta raw XML to be set * @param meta raw XML to be set
* @throws IOException if raw can not be set
*/ */
public void setMeta(String meta) throws IOException { public void setMeta(String meta) throws IOException {
setRawXML(meta.getBytes()); setRawXML(meta.getBytes());