X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-cass%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fdao%2FLoader.java;fp=auth%2Fauth-cass%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fdao%2FLoader.java;h=9320381072a70b7b6c5fe9fbcbf138304661064b;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=4a078f900e587dda5570b756c90fcaffb7f187d3;hpb=bdce7667a6e272e2fa32e298d957a0d9090c5bc9;p=aaf%2Fauthz.git diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/Loader.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/Loader.java index 4a078f90..93203810 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/Loader.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/Loader.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. @@ -40,11 +40,11 @@ public abstract class Loader { public Loader(int keylimit) { this.keylimit = keylimit; } - + public int keylimit() { return keylimit; } - + protected abstract DATA load(DATA data, Row row); protected abstract void key(DATA data, int idx, Object[] obj); protected abstract void body(DATA data, int idx, Object[] obj); @@ -74,7 +74,7 @@ public abstract class Loader { } return rv; } - + public static void writeString(DataOutputStream os, String s) throws IOException { if (s==null) { os.writeInt(-1); @@ -90,11 +90,11 @@ public abstract class Loader { } } } - - + + /** * We use bytes here to set a Maximum - * + * * @param is * @param MAX * @return @@ -118,10 +118,10 @@ public abstract class Loader { /** * Write a set with proper sizing - * + * * Note: at the moment, this is just String. Probably can develop system where types * are supported too... but not now. - * + * * @param os * @param set * @throws IOException @@ -137,7 +137,7 @@ public abstract class Loader { } } - + public static Set readStringSet(DataInputStream is, byte[] buff) throws IOException { int l = is.readInt(); if (l<0) { @@ -149,7 +149,7 @@ public abstract class Loader { } return set; } - + public static List readStringList(DataInputStream is, byte[] buff) throws IOException { int l = is.readInt(); if (l<0) { @@ -162,7 +162,7 @@ public abstract class Loader { return list; } - /** + /** * Write a map * @param os * @param map @@ -198,7 +198,7 @@ public abstract class Loader { os.writeInt(magic); os.writeInt(version); } - + public static int readHeader(DataInputStream is, final int magic, final int version) throws IOException { if (is.readInt()!=magic) { throw new IOException("Corrupted Data Stream");