By Oleg Mazurashu,on April 19th,2010% In this post I am going to show you how to use SequenceInputStream in Java. A SequenceInputStream first reads all the bytes from the first stream in the sequence,then all the bytes from the second,third and so on. When the end of one stream is reached,that stream is closed and the next . . . →Read More:Using Sequence Input Stream in Java By Oleg Mazurashu,on April 16th,2010% You can download it from this link. Details you can find on Release Notes page. By Oleg Mazurashu,on March 30th,2010% You can download it from this link. Details you can find on Release Notes page. By Oleg Mazurashu,on March 25th,2010% The System class maintains a Properties object that describes the configuration of the current working environment. System properties include information about the current user,the current version of the Java runtime,and the character used to separate components of a file path name. In this post I am going to show simple example which shows . . . →Read More:Using system properties in Java By Oleg Mazurashu,on March 25th,2010% I am going to demonstrate example which shows how to get environment variables from Java code import java.io.IOException;import java.util.Map;public class Main{public static void main(String[] args) throws IOException . . . →Read More:Getting system environment variables in Java By Oleg Mazurashu,on March 25th,2010% Java has great API for working with properties. In this post I am going to show example which shows how to work with properties with Properties class. In my work I very often use properties and xml files for configuration. Example will show how to load properties from property file,how to read them,how . . . →Read More:Using Properties in Java By Oleg Mazurashu,on March 22nd,2010% Data streams read and write strings,integers,floating-point numbers,and other data. The DataInputStream and DataOutputStream classes read and write the primitive Java data types (boolean,int,double,etc.) and strings in a particular,well-defined,platform-independent format. Since DataInputStream and DataOutputStream use the same formats,they’re complementary. These classes are especially useful when you need . . . →Read More:Using Data Streams in Java By Oleg Mazurashu,on March 15th,2010% I want to show how I implemented filter output stream that send data to multiple underlying streams. It is very easy. I need output stream for this import java.io.FilterOutputStream;import java.io.IOException;import java.io.OutputStream;public class MultitargetOutputStream . . . →Read More:Multitargeting output streams in Java By Oleg Mazurashu,on March 15th,2010% The PushbackInputStream class provides a pushback buffer so a program can “unread”bytes. In other words,it can add bytes to the stream and then read them. This class allows to add data to the stream while they’re reading it. The next time data is read from the stream,the unread bytes are reread. Example: . . . →Read More:Using PushBackInputStream in Java By Oleg Mazurashu,on March 15th,2010% Buffered input streams read more data than they initially need into a buffer (an internal array of bytes). When one of the stream’s read() methods is invoked,data is removed from the buffer rather than from the underlying stream. When the buffer runs out of data,the buffered stream refills its buffer from the underlying . . . →Read More:Using buffered streams in Java | A sample text widgetEtiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa. Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna,tincidunt vitae molestie nec,molestie at mi. Nulla nulla lorem,suscipit in posuere in,interdum non magna. | "If people do not believe that architecture is simple,it is only because they do not realize how complicated life is." - J.H. von Neumann |
Recent Comments