X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=misc%2Fenv%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fmisc%2Fenv%2FData.java;h=4c64e5de3b23ec8d87a15305d215886212ec8024;hb=4b5a7d721d994a49057e9bfb403c7bff1b376660;hp=155dfc7150a7c598c296770a60048ed96cd123eb;hpb=c6b83856d26666396085f6cfb7be3dbbae3b3cd7;p=aaf%2Fauthz.git diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/Data.java b/misc/env/src/main/java/org/onap/aaf/misc/env/Data.java index 155dfc71..4c64e5de 100644 --- a/misc/env/src/main/java/org/onap/aaf/misc/env/Data.java +++ b/misc/env/src/main/java/org/onap/aaf/misc/env/Data.java @@ -42,7 +42,7 @@ import java.io.Writer; * the "options" available on several functions control the output of this particular call. When * blank, they will default to the DataFactory defaults. When present, they override this * particular call. - * The available options are "pretty" (for XML and JSON) and "fragment" (XML only concept), which drops + * The available options are "pretty" (for XML and JSON) and "fragment" (XML only concept), which drops * the "" header so you can create larger XML documents from the output. * * @author Jonathan @@ -50,64 +50,64 @@ import java.io.Writer; * @param */ public interface Data { - static enum TYPE {XML,JSON,JAXB,RAW,DEFAULT}; - // can & with 0xFFFF; -// public static final int XML = 0x1; -// public static final int JSON = 0x2; -// public static final int JAXB = 0x4; -// public static final int RAW = 0x1000; - - // can & with 0xF00000; - public static final int PRETTY = 0x100000; - public static final int FRAGMENT = 0x200000; + static enum TYPE {XML,JSON,JAXB,RAW,DEFAULT}; + // can & with 0xFFFF; +// public static final int XML = 0x1; +// public static final int JSON = 0x2; +// public static final int JAXB = 0x4; +// public static final int RAW = 0x1000; + + // can & with 0xF00000; + public static final int PRETTY = 0x100000; + public static final int FRAGMENT = 0x200000; - /** - * Respond with the String if it exists, or marshal the String and pass the result back. - * - * However, use the Env the Data Object was created with. - * - * @return String - * @throws APIException - */ - public String asString() throws APIException; + /** + * Respond with the String if it exists, or marshal the String and pass the result back. + * + * However, use the Env the Data Object was created with. + * + * @return String + * @throws APIException + */ + public String asString() throws APIException; - /** - * Respond with the Object of type {@literal } if it exists, or unmarshal from String - * and pass the result back.

- * - * However, use the Env the Data Object was created with. - * - * @return T - * @throws APIException - */ - public T asObject() throws APIException; + /** + * Respond with the Object of type {@literal } if it exists, or unmarshal from String + * and pass the result back.

+ * + * However, use the Env the Data Object was created with. + * + * @return T + * @throws APIException + */ + public T asObject() throws APIException; - /** - * Set a particular option on an existing Out - * - * if int is negative, it should remove the option - * @param option - */ - public Data option(int option); + /** + * Set a particular option on an existing Out + * + * if int is negative, it should remove the option + * @param option + */ + public Data option(int option); - public Data to(OutputStream os) throws APIException, IOException; - public Data to(Writer writer) throws APIException, IOException; - - public Data load(T t) throws APIException; - public Data load(String str) throws APIException; - public Data load(InputStream is) throws APIException; - public Data load(Reader rdr) throws APIException; - - public Data in(TYPE type); - public Data out(TYPE type); - /** - * Return the Class Type supported by this DataObject - * - * @return {@literal Class} - */ - public Class getTypeClass(); + public Data to(OutputStream os) throws APIException, IOException; + public Data to(Writer writer) throws APIException, IOException; + + public Data load(T t) throws APIException; + public Data load(String str) throws APIException; + public Data load(InputStream is) throws APIException; + public Data load(Reader rdr) throws APIException; + + public Data in(TYPE type); + public Data out(TYPE type); + /** + * Return the Class Type supported by this DataObject + * + * @return {@literal Class} + */ + public Class getTypeClass(); - public void direct(InputStream input, OutputStream output) throws APIException, IOException; + public void direct(InputStream input, OutputStream output) throws APIException, IOException; } \ No newline at end of file