Best code examples for Java 8 InputStream class (java.io.InputStream)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 InputStream class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 InputStream examples from Open Source projects
This code example shows how to use the following methods: close
78:	InputStream in = new BufferedInputStream(new FileInputStream(inputFile)); 
-
82:	XMLStreamReader reader = factory.createXMLStreamReader(in); 
-
90:	in.close(); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: close
41:	return IOUtils.toString(s); 
-
43:	s.close(); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: close, mark, read, reset
170:	isToUse.mark(1); 
-
173:	int code = isToUse.read(); 
-
182:	major = isToUse.read(); 
183:	minor = isToUse.read(); 
-
187:	in = new Hessian2Input(isToUse); 
-
193:	isToUse.reset(); 
194:	in = new Hessian2Input(isToUse); 
-
200:	major = isToUse.read(); 
201:	minor = isToUse.read(); 
202:	in = new HessianInput(isToUse); 
-
228:	isToUse.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
64:	is.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: available, mark, markSupported, read, reset
183:	* @param entityStream the output stream to marshal to. 
184:	* @throws javax.xml.bind.JAXBException 
185:	*/ 
186:	protected void writeTo(Object t, MediaType mediaType, Charset c, 
-
190:	} 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: read
93:	input = codec.createInputStream(input, decompressor); 
-
97:	IOUtils.readFully(input, memory, 0, memory.length); 
-
110:	if (input.read() >= 0 ) { 
-
117:	IOUtils.cleanup(LOG, input); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: mark, markSupported, read, reset
85:	InputStream markSupportingStream = encodedStream.markSupported() ? encodedStream : 
-
88:	markSupportingStream.mark(1); 
-
90:	int firstByte = markSupportingStream.read(); 
91:	markSupportingStream.reset(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
68:	InputStream stream = new FileInputStream(getFile()); 
-
70:	properties.load(stream); 
-
72:	stream.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: read
51:	IOUtils.close(currentStream); 
-
92:	final int read = stream.read(buffer, offset, length); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: mark, read, reset
141:	input.mark(10000); 
-
143:	int result = input.read(); 
-
151:	input.reset(); 
-
154:	int markerReadResult = 
-
157:	input.reset(); 
-
161:	return input.read(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
47:	InputStream input = new BufferedInputStream(new FileInputStream(file)); 
-
53:	input.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: read
63:	ByteArrayInputStream dgStream = new ByteArrayInputStream(dgram); 
-
69:	rxDest = Destination.create(dgStream); 
-
72:	rxSign.readBytes(dgStream); 
-
75:	rxPayloadLen = dgStream.read(rxPayload); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
30:	byte[] inflated = IOUtils.toByteArray(is); 
31:	is.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: available, reset
75:	sourceSize = stream.available(); 
-
83:	super.prepareForReading(stream); 
-
141:	stream.reset(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: decodeStream
53:	BitmapFactory.decodeStream(in, null, decodeOptions); 
-
57:	StreamUtils.close(in); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: mark, markSupported, read, reset
183:	if (input.markSupported()) { 
184:	input.mark(1); 
185:	int i = input.read(); 
186:	input.reset(); 
-
197:	int b = input.read(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
125:	is = new FileInputStream(file); 
126:	lines = IOUtils.readLines(is, encoding); 
-
132:	is.close(); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: close
32:	stream = new BufferedInputStream(file.getContents(true)); 
-
34:	return Util.getInputStreamAsByteArray(stream, -1); 
-
37:	stream.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: available, read
19:	byte[] content = new byte[file.available()]; 
20:	file.read(content); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: close
72:	in.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
100:	XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is); 
-
105:	is.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: skip
56:	InputStream inputStream = new BufferedInputStream( 
-
59:	OutputBlob outputBlob = new OutputBlob(inputStream, 10); 
-
61:	Assert.assertSame(inputStream, outputBlob.getBinaryStream()); 
-
68:	inputStream.skip(1); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: close
78:	this.skeleton.invoke(new BurlapInput(inputStream), new BurlapOutput(outputStream)); 
-
82:	inputStream.close(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: markSupported
50:	return is.markSupported(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: read
83:	return wrappedStream.read(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: decodeStream
73:	bitmap = BitmapFactory.decodeStream( stream, null, options ); 
74:	IOUtils.closeSilently( stream ); 
-
87:	IOUtils.closeSilently( stream ); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: read
128:	String lineCompressFlag = CacheManager.receiveLine( dataInputStream ); 
-
143:	String lineSize = CacheManager.receiveLine( dataInputStream ); 
-
156:	int read = dataInputStream.read( data ); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: close
91:	XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is); 
-
96:	is.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
67:	resourceStream.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
122:	InputStream avroSchemaInputStream = new FileInputStream(expectedOutputFile); 
-
126:	avroSchema = Schema.parse(avroSchemaInputStream); 
-
130:	avroSchemaInputStream.close(); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: close
138:	LogManager.getLogManager().readConfiguration(is); 
-
141:	is.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
159:	ProjectManager.singleton.importProject(projectID, inputStream, !urlString.endsWith(".tar")); 
-
161:	inputStream.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
95:	is.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
96:	is.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
93:	in.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
224:	final Document document = new SAXReader().read(is); 
-
230:	is.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
42:	importer.openDatabase(is, password, "/sdcard/key"); 
-
44:	is.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
41:	return IOUtils.toString(s); 
-
43:	s.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
275:	IOUtils.readFully(in, buf, 0, buf.length); 
276:	in.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
105:	String schemaJson = IOUtils.toString(schemaInput); 
-
111:	if (null != schemaInput) schemaInput.close(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: close
51:	Importer importer = ImporterFactory.createImporter(is); 
-
54:	is.close(); 
Full Snippet Info
8
CodeRank
Related Java 8 InputStream Questions & Answers:
Other Java 8 InputStream Examples
16:	    setContentView(R.layout.activity_main);
17:	    ImageView button = (ImageView) findViewById(R.id.image);
18:	    InputStream resource = getResources().openRawResource(R.drawable.dog);
19:	    Bitmap bitmap = BitmapFactory.decodeStream(resource);
20:	    button.setBackground(new MyRoundCornerDrawable(bitmap));

Read More

35:	  @Override
36:	  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
37:	    InputStream stream = null;
38:	    if (requestCode == REQUEST_CODE && resultCode == Activity.RESULT_OK)
39:	      try {

Read More

4:	 
5:	public class Utils {
6:	    public static void CopyStream(InputStream is, OutputStream os)
7:	    {
8:	        final int buffer_size=1024;

Read More

4:	public class Utils {
5:	    public static void CopyStream(InputStream is, OutputStream os)
6:	    {
7:	        final int buffer_size=1024;
8:	        try

Read More

50:				Bitmap mIcon11 = null;
51:				try {
52:					InputStream in = new java.net.URL(urldisplay).openStream();
53:					mIcon11 = BitmapFactory.decodeStream(in);
54:				} catch (Exception e) {

Read More

See Code Examples for Java 8 InputStream Methods: