mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
#39 The supplied Input unnecessarily is not written into memory
This commit is contained in:
parent
d7ee019194
commit
efd4fd5fff
63 changed files with 1111 additions and 18196 deletions
|
|
@ -19,24 +19,46 @@
|
|||
|
||||
package de.kosit.validationtool.api;
|
||||
|
||||
import lombok.*;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.xml.transform.Source;
|
||||
|
||||
/**
|
||||
* Eine Datei in eingelesener Form.
|
||||
* An input for the validator.
|
||||
*
|
||||
* @author apenski
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor (access = AccessLevel.PACKAGE)
|
||||
@AllArgsConstructor (access = AccessLevel.PACKAGE)
|
||||
public class Input {
|
||||
|
||||
private final byte[] content;
|
||||
public interface Input {
|
||||
|
||||
private final String name;
|
||||
/**
|
||||
* The name of the input for document identification
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
private byte[] hashCode;
|
||||
/**
|
||||
* The hashcode for document identification
|
||||
*
|
||||
* @return the computed hashcode
|
||||
*/
|
||||
byte[] getHashCode();
|
||||
|
||||
private String digestAlgorithm;
|
||||
/**
|
||||
* The digest algorithm used for computing the {@link #getHashCode()}
|
||||
*
|
||||
* @return the name of the digest algorith
|
||||
*/
|
||||
String getDigestAlgorithm();
|
||||
|
||||
/**
|
||||
* Opens a new {@link InputStream } for this input which carries the actual data
|
||||
*
|
||||
* @return an open {@link InputStream}
|
||||
* @throws IOException on I/O while opening the stream
|
||||
*/
|
||||
Source getSource() throws IOException;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue