php    php100   android
當前位置:首頁 » java.io包 »

Java.io.StringBufferInputStream類

評論  編輯

The java.util.StringBufferInputStream class allows an application to create an input stream in which the bytes read are supplied by the contents of a string. Applications can also read bytes from a byte array by using a ByteArrayInputStream.Only the low eight bits of each character in the string are used by this class.

This class has been deprecated by Oracle and should not be used any more.

類聲明

以下是聲明java.util.StringBufferInputStream class:

public class StringBufferInputStream
   extends InputStream

字段域

Following are the fields for java.util.StringBufferInputStream class:

  • protected String buffer -- This is the string from which bytes are read..

  • protected int count -- This is the number of valid characters in the input stream buffer.

  • protected int pos -- This is the index of the next character to read from the input stream buffer.

類構造方法

S.N.構造方法 & 詳細描述
1StringBufferInputStream(String s)
This creates a string input stream to read data from the specified string.

類方法

S.N.方法 & 描述
1int available()
This method returns the number of bytes that can be read from the input stream without blocking.
2int read()
This method reads the next byte of data from this input stream.
3int read(byte[] b, int off, int len)
This method reads up to len bytes of data from this input stream into an array of bytes.
4void reset()
This method resets the input stream to begin reading from the first character of this input stream's underlying buffer.
5long skip(long n)
This method skips n bytes of input from this input stream.

方法繼承

此類從以下類繼承了上麵列出的方法

  • java.util.InputStreams

  • java.util.Object


貢獻/合作者

正在開放中...
 

評論(條)

  • 還冇有評論!