diff options
Diffstat (limited to 'nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/InputStreamRunnable.java')
-rw-r--r-- | nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/InputStreamRunnable.java | 57 |
1 files changed, 57 insertions, 0 deletions
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 |