X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=misc%2Frosetta%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fmisc%2Frosetta%2Fmarshal%2FDataWriter.java;h=e546d6dcb34b5c685b855304d8ac8db5b271f79f;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=849a32149e7b6b62d49fba38a4f78b3d0592522d;hpb=4b5a7d721d994a49057e9bfb403c7bff1b376660;p=aaf%2Fauthz.git diff --git a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/DataWriter.java b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/DataWriter.java index 849a3214..e546d6dc 100644 --- a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/DataWriter.java +++ b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/DataWriter.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,38 +26,38 @@ import javax.xml.datatype.XMLGregorianCalendar; import org.onap.aaf.misc.env.util.Chrono; /** - * We make these objects instead of static functions so they can be passed into + * We make these objects instead of static functions so they can be passed into * FieldArray. - * + * * @author Jonathan * * @param */ public abstract class DataWriter { public abstract boolean write(T t, StringBuilder sb); - + public final static DataWriter STRING = new DataWriter() { @Override public boolean write(String s, StringBuilder sb) { sb.append(s); return true; - } + } }; - + public final static DataWriter INTEGER = new DataWriter() { @Override public boolean write(Integer i, StringBuilder sb) { sb.append(i); return false; - } + } }; - + public final static DataWriter LONG = new DataWriter() { @Override public boolean write(Long t, StringBuilder sb) { sb.append(t); return false; - } + } }; public final static DataWriter BYTE = new DataWriter() { @@ -65,7 +65,7 @@ public abstract class DataWriter { public boolean write(Byte t, StringBuilder sb) { sb.append(t); return false; - } + } }; public final static DataWriter CHAR = new DataWriter() { @@ -73,7 +73,7 @@ public abstract class DataWriter { public boolean write(Character t, StringBuilder sb) { sb.append(t); return true; - } + } }; public final static DataWriter BOOL = new DataWriter() { @@ -81,7 +81,7 @@ public abstract class DataWriter { public boolean write(Boolean t, StringBuilder sb) { sb.append(t); return true; - } + } }; @@ -99,7 +99,7 @@ public abstract class DataWriter { // } return true; } - + }; */ @@ -110,7 +110,7 @@ public abstract class DataWriter { return true; } }; - + public final static DataWriter DATE_TIME = new DataWriter() { @Override public boolean write(XMLGregorianCalendar t, StringBuilder sb) { @@ -123,11 +123,11 @@ public abstract class DataWriter { public final static DataWriter HEX_BINARY = new DataWriter() { @Override public boolean write(byte[] ba, StringBuilder sb) { - // FYI, doing this because don't want intermediate + // FYI, doing this because don't want intermediate // String in "HexString" or the processing in // "String.format" //sb.append("0x"); - for(int i=0;i>4)]); sb.append(chars[b&0xF]);