Add modify vnf feature on driver
[vfc/nfvo/driver/vnfm/svnfm.git] / nokia / vnfmdriver / vfcadaptorservice / vfcadaptor / src / main / java / org / onap / vfc / nfvo / driver / vnfm / svnfm / cbam / impl / InputStreamRunnable.java
1 /*
2  * Copyright 2016-2017, Nokia Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.impl;
18
19 import java.io.BufferedInputStream;
20 import java.io.BufferedReader;
21 import java.io.InputStream;
22 import java.io.InputStreamReader;
23
24 public class InputStreamRunnable implements Runnable  
25 {  
26     BufferedReader bReader=null;  
27     String type=null;  
28     public InputStreamRunnable(InputStream is, String _type)  
29     {  
30         try  
31         {  
32             bReader=new BufferedReader(new InputStreamReader(new BufferedInputStream(is),"UTF-8"));  
33             type=_type;  
34         }  
35         catch(Exception ex)  
36         {  
37         }  
38     }  
39     public void run()  
40     {  
41         String line;  
42         int lineNum=0;  
43   
44         try  
45         {  
46             while((line=bReader.readLine())!=null)  
47             {  
48                 lineNum++;  
49                 //Thread.sleep(200);  
50             }  
51             bReader.close();  
52         }  
53         catch(Exception ex)  
54         {  
55         }  
56     }  
57 }