IO streams two

A data stream (Learn)

1.1 Overview

  • In order to facilitate operation of the basic data types java language type String and data, the data stream may be used.
  • Data stream classification:
    • DataInputStream
    • DataOutputStream  
  • Common methods:
    • Read boolean values:  
public final boolean readBoolean () {}
public final void writeBoolean(boolean v){}
    • Read a byte of data:  
public final byte readByte(){}
public final void writeByte(int v){}
    • Reading a char data type:  
public final void writeChar(int v){}
public final char readChar(){}
    • Reading a float type data:  
public final float readFloat(){}
public final void writeFloat(float v){}
    • Read type double data:  
public final double readDouble(){}
public final void writeDouble(double v){}
    • Reading a short type of data:  
public final short readShort(){}
public final void writeShort(int v){}
    • Reading a long type of data:  
public final long readLong(){}
public final void writeLong(long v){}
    • Int read data types:  

Guess you like

Origin www.cnblogs.com/xuweiweiwoaini/p/11115968.html