X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=nokia%2Fvnfmdriver%2Fvfcadaptorservice%2Fvfcadaptor%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fvfc%2Fnfvo%2Fdriver%2Fvnfm%2Fsvnfm%2Fcbam%2Fimpl%2FInputStreamRunnable.java;fp=nokia%2Fvnfmdriver%2Fvfcadaptorservice%2Fvfcadaptor%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fvfc%2Fnfvo%2Fdriver%2Fvnfm%2Fsvnfm%2Fcbam%2Fimpl%2FInputStreamRunnable.java;h=5a1708fc2c1abd28ab66b04d4d256d7796bd58b7;hb=6ba81c29f8ee403b4ad9f976d1d6d14fbbd7664c;hp=0000000000000000000000000000000000000000;hpb=f3a7349ce2b342fc497035950d0afd000e71ce9c;p=vfc%2Fnfvo%2Fdriver%2Fvnfm%2Fsvnfm.git diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/InputStreamRunnable.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/InputStreamRunnable.java new file mode 100644 index 00000000..5a1708fc --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/InputStreamRunnable.java @@ -0,0 +1,57 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.impl; + +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; + +public class InputStreamRunnable implements Runnable +{ + BufferedReader bReader=null; + String type=null; + public InputStreamRunnable(InputStream is, String _type) + { + try + { + bReader=new BufferedReader(new InputStreamReader(new BufferedInputStream(is),"UTF-8")); + type=_type; + } + catch(Exception ex) + { + } + } + public void run() + { + String line; + int lineNum=0; + + try + { + while((line=bReader.readLine())!=null) + { + lineNum++; + //Thread.sleep(200); + } + bReader.close(); + } + catch(Exception ex) + { + } + } +} \ No newline at end of file