Code example for InputStream

Methods: close

0
    if (null == schemaId) return null; 
 
    InputStream schemaInput = _classLoader.getResourceAsStream(resource); 
    try 
    { 
      String schemaJson = IOUtils.toString(schemaInput); 
      VersionedSchema schema = new VersionedSchema(schemaId, Schema.parse(schemaJson), null); 
      return schema; 
    } 
    finally 
    { 
      if (null != schemaInput) schemaInput.close(); 
    } 
  } 
 
  private List<String> readIndex(BufferedReader indexReader) throws IOException 
  { 
    ArrayList<String> result = new ArrayList<String>(); 
    String line = null; 
    while (null != (line = indexReader.readLine())) 
Experience pair programming with AI  Get Codota for Java