java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
- All Implemented Interfaces:
- Closeable, DataInput
- See Also:
- Top Examples, Source Code,
DataOutputStream
public int available()
throws IOException
- See Also:
- InputStream
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void close()
throws IOException
- See Also:
- InputStream
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public DataInputStream(InputStream in)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1102]Create a file DataInputStream
By Anonymous on 2004/11/07 21:20:24 Rate
DataInputStream dis = new DataInputStream ( new FileInputStream ( inputFile ) ) ;
[1782]DataInputStream
By Hearty on 2006/06/27 23:14:44 Rate
DataInputStream dataInputStream = new DataInputStream ( System.in )
[1819]Use of DataInputStream
By Anonymous on 2006/09/18 02:55:40 Rate
DataInputStream is used for getting the User inputs from CommandLine.
protected InputStream in
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void mark(int readlimit)
- See Also:
InputStream.reset()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public boolean markSupported()
- See Also:
InputStream.reset()
, InputStream.mark(int)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int read()
throws IOException
- See Also:
- InputStream
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final int read(byte[] b)
throws IOException
- See Also:
InputStream.read(byte[], int, int)
, FilterInputStream.in
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final int read(byte[] b,
int off,
int len)
throws IOException
- See Also:
FilterInputStream.in
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final boolean readBoolean()
throws IOException
- See Also:
FilterInputStream.in
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final byte readByte()
throws IOException
- See Also:
FilterInputStream.in
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final char readChar()
throws IOException
- See Also:
FilterInputStream.in
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final double readDouble()
throws IOException
- See Also:
Double.longBitsToDouble(long)
, readLong()
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final float readFloat()
throws IOException
- See Also:
Float.intBitsToFloat(int)
, readInt()
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final void readFully(byte[] b)
throws IOException
- See Also:
FilterInputStream.in
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final void readFully(byte[] b,
int off,
int len)
throws IOException
- See Also:
FilterInputStream.in
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final int readInt()
throws IOException
- See Also:
FilterInputStream.in
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
@Deprecated
public final String readLine()
throws IOException
- See Also:
FilterInputStream.in
, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final long readLong()
throws IOException
- See Also:
FilterInputStream.in
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final short readShort()
throws IOException
- See Also:
FilterInputStream.in
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final int readUnsignedByte()
throws IOException
- See Also:
FilterInputStream.in
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final int readUnsignedShort()
throws IOException
- See Also:
FilterInputStream.in
, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final String readUTF()
throws IOException
- See Also:
readUTF(java.io.DataInput)
, UTFDataFormatException, EOFException, DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1875]
By Anonymous on 2007/04/23 01:25:31 Rate
public void run ( )
{
while ( true )
{
try {
str=din.readUTF ( ) ;
System.out.println ( str ) ;
} catch ( Exception e ) {
System.out.println ( "errors ; "+e ) ;
}
}
public static final String readUTF(DataInput in)
throws IOException
- See Also:
readUnsignedShort()
, UTFDataFormatException, EOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[712]Open a DataInputStream from a StringBuffer
By sandra on 2005/05/12 06:10:59 Rate
StringBuffer buf = new StringBuffer ( ) ;
String s = buf.toString ( ) ;
ByteArrayInputStream FileBuf = new ByteArrayInputStream ( s.getByte ( ) ) ;
DataInputStream inData = new DataInputStream ( FileBuf ) ;
String sfinal = inData.readUTF ( ) ;
public void reset()
throws IOException
- See Also:
-
InputStream.mark(int)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public long skip(long n)
throws IOException
- See Also:
- InputStream
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final int skipBytes(int n)
throws IOException
- See Also:
- DataInput
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples