Init with a given inputStream.

@param inputStream
to read the Manifest file from
356526
public void init(final InputStream inputStream) {
		try (final InputStream is = inputStream) {
			final Manifest mf = new Manifest(is);
			final Attributes attr = mf.getMainAttributes();
			commit = attr.getValue("git-commit");
			gitUrl = attr.getValue("git-url");
			version = attr.getValue("project-version");
			final long time = Long.parseLong(attr.getValue("creation-date"));
			creationDate = DateFormat.getDateTimeInstance(DATEFORMAT, DATEFORMAT).format(new Date(time));
		} catch (Exception e) {
			initBackToDefaults();
		}
	}
128675
public static Properties loadProperties(InputStream inputStream) {
        Properties prop = new Properties();
        try {
            prop.load(inputStream);
        } catch (IOException e) {
            throw E.ioException(e);
        } finally {
            IO.close(inputStream);
        }
        return prop;
    }
416734
public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException {
    LOGGER.trace("copy(InputStream, OutputStream)");
    copy(inputStream, outputStream, new byte[BUFFER_SIZE]);
  }
543326
protected String read(InputStream inputStream) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, encoding));
        StringBuffer stringBuffer = new StringBuffer();
        String line = reader.readLine();
        while (line != null) {
            stringBuffer.append(line).append("\n");
            line = reader.readLine();
        }
        return stringBuffer.toString();
    }
767169
public static LifecycleChaincodePackage fromStream(InputStream inputStream) throws IOException, InvalidArgumentException {
        if (null == inputStream) {
            throw new InvalidArgumentException("The parameter inputStream may not be null.");
        }
        byte[] packageBytes = IOUtils.toByteArray(inputStream);
        return fromBytes(packageBytes);
    }
192165
public void init(InputStream is, OutputStream os, boolean isClient)
    {
        this.is = is;
        this.os = os;
        this.isClient = isClient;
    }
329525
public void load(InputStream input) throws IOException {

        ParameterReader reader = null;

        try {
            reader = new ParameterReader(new InputStreamReader(input, CmsEncoder.ENCODING_ISO_8859_1));

        } catch (UnsupportedEncodingException ex) {

            reader = new ParameterReader(new InputStreamReader(input));
        }

        while (true) {
            String line = reader.readParameter();
            if (line == null) {
                return; // EOF
            }
            int equalSign = line.indexOf('=');

            if (equalSign > 0) {
                String key = line.substring(0, equalSign).trim();
                String value = line.substring(equalSign + 1).trim();

                if (CmsStringUtil.isEmptyOrWhitespaceOnly(value)) {
                    continue;
                }

                add(key, value, true);
            }
        }
    }
932043
public static void copy(final InputStream inputStream, final OutputStream outputStream)
      throws IOException {
    new ByteSource() {
      @Override
      public InputStream openStream() {
        return inputStream;
      }
    }.copyTo(new ByteSink() {
      @Override
      public OutputStream openStream() {
        return outputStream;
      }
    });
  }
119713
public void open(InputStream stream) throws IOException
    {

        int size = (int) (stream.available() / UNIT_SIZE);
        _array = new int[size];

        DataInputStream in = null;
        try
        {
            in = new DataInputStream(new BufferedInputStream(
                    stream));
            for (int i = 0; i < size; ++i)
            {
                _array[i] = in.readInt();
            }
        }
        finally
        {
            if (in != null)
            {
                in.close();
            }
        }
    }
107023
public static String readTextFile(InputStream inputStream) {
        InputStreamReader streamReader = new InputStreamReader(inputStream);
        return readTextFile(streamReader);
    }
703055
@Override
    public void initialize(InputStream inputStream, DumpTableEnum table)
			throws IOException {

		unbufferedResult = new PipedInputStream();
		decodedStream = new PipedOutputStream(unbufferedResult);
		result = new BufferedInputStream(unbufferedResult, BUFFERSIZE);

		xmlInputThread = new XMLDumpTableInputStreamThread(inputStream,
				decodedStream, table);
		xmlInputThread.start();

	}
246380
public void load(InputStream inputStream) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
        StringBuilder out = new StringBuilder();
        String line;

        while ((line = reader.readLine()) != null) {
            out.append(line);
            out.append(System.lineSeparator());
        }

        setScriptText(out.toString());
    }
233830
@SuppressWarnings("unchecked") // yaml.load API returns raw Map
  public static Map<String, Object> loadStream(InputStream inputStream) {
    LOG.fine("Reading config stream");

    Yaml yaml = new Yaml();
    Map<Object, Object> propsYaml = (Map<Object, Object>) yaml.load(inputStream);
    LOG.fine("Successfully read config");

    Map<String, Object> typedMap = new HashMap<>();
    for (Object key: propsYaml.keySet()) {
      typedMap.put(key.toString(), propsYaml.get(key));
    }

    return typedMap;
  }
343781
public void init() {
        if (manifests == null) {
            manifests = new ArrayList<>();
            
            try {
                primaryManifest = addToList(applicationContext.getResource(MANIFEST_PATH));
                Resource[] resources = applicationContext.getResources("classpath*:/" + MANIFEST_PATH);

                for (Resource resource : resources) {
                    Manifest manifest = addToList(resource);
                    
                    if (primaryManifest == null) {
                        primaryManifest = manifest;
                    }
                }

            } catch (Exception e) {
                log.error("Error enumerating manifests.", e);
            }

        }
    }
196356
private void loadStream(InputStream stream)
    {
        int            iPos       = -1;
        String         strLine    = null;
        String         strSection = null;
        String         strRemarks = null;
        BufferedReader objBRdr    = null;
        InputStreamReader     objFRdr    = null;
        INISection     objSec     = null;

        try
        {
            objFRdr = new InputStreamReader(stream);
            if (objFRdr != null)
            {
                objBRdr = new BufferedReader(objFRdr);
                if (objBRdr != null)
                {
                    while (objBRdr.ready())
                    {
                        iPos = -1;
                        strLine  = null;
                        strLine = objBRdr.readLine().trim();
                        if (strLine == null)
                        {
                        }
                        else if (strLine.length() == 0)
                        {
                        }
                        else if (strLine.substring(0, 1).equals(";"))
                        {
                            if (strRemarks == null)
                                strRemarks = strLine.substring(1);
                            else if (strRemarks.length() == 0)
                                strRemarks = strLine.substring(1);
                            else
                                strRemarks = strRemarks + "\r\n" + strLine.substring(1);
                        }
                        else if (strLine.startsWith("[") && strLine.endsWith("]"))
                        {
                            // Section start reached create new section
                            if (objSec != null) 
                                this.mhmapSections.put(strSection.trim(), objSec);
                            objSec = null;
                            strSection = strLine.substring(1, strLine.length() - 1);
                            objSec = new INISection(strSection.trim(), strRemarks);
                            strRemarks = null;
                        }
                        else if ((iPos = strLine.indexOf("=")) > 0 && objSec != null)
                        {
                            // read the key value pair 012345=789
                            objSec.setProperty(strLine.substring(0, iPos).trim(), 
                                                strLine.substring(iPos + 1).trim(), 
                                                strRemarks);
                            strRemarks = null;
                        }
                        else 
                        {
                            objSec.setProperty(strLine, "", strRemarks);
                      
                        }
                    }
                    if (objSec != null)
                        this.mhmapSections.put(strSection.trim(), objSec);
                    this.mblnLoaded = true;
                }
            }
        }
        catch (FileNotFoundException FNFExIgnore)
        {
            this.mhmapSections.clear();
        }
        catch (IOException IOExIgnore)
        {
            this.mhmapSections.clear();
        }
        catch (NullPointerException NPExIgnore)
        {
            this.mhmapSections.clear();
        }
        finally
        {
            if (objBRdr != null)
            {
                closeReader(objBRdr);
                objBRdr = null;
            }
            if (objFRdr != null)
            {
                closeReader(objFRdr);
                objFRdr = null;
            }
            if (objSec != null) objSec = null;
        }
    }
533745
private void copyStream(InputStream inputStream) throws IOException {
		OutputStream outputStream = null;
		try {
			outputStream = getContext().getOutputStream();
			byte[] buffer = new byte[65535];
			int bufferLen;
			int totalLen = 0;
			while ((bufferLen = inputStream.read(buffer)) > 0) {
				outputStream.write(buffer, 0, bufferLen);
				totalLen += bufferLen;
			}
			getContext().getResponse().setContentLength(totalLen);
		} finally {
			if (outputStream != null) {
				outputStream.flush();
			}
		}
	}
10023
@Override
	public void loadFromXML(final InputStream in) throws IOException {
		lock.writeLock().lock();
		try {
			properties.loadFromXML(in);
		} finally {
			lock.writeLock().unlock();
		}
	}