GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Python Technologies
  • Databases
  • Computer Programming
  • Web Development
  • Java Technologies
  • Computer Science
  • Mobile Development
  • Big Data & Analytics
  • Microsoft Technologies
  • DevOps
  • Latest Technologies
  • Machine Learning
  • Digital Marketing
  • Software Quality

This view

  • Original page
  • New address

GeezerVison is showing www.tutorialspoint.com — Java - StringBufferInputStream class

Java.io Package Tutorial
  • Java.io - Home
  • Java.io - BufferedInputStream
  • Java.io - BufferedOutputStream
  • Java.io - BufferedReader
  • Java.io - BufferedWriter
  • Java.io - ByteArrayInputStream
  • Java.io - ByteArrayOutputStream
  • Java.io - CharArrayReader
  • Java.io - CharArrayWriter
  • Java.io - Console
  • Java.io - DataInputStream
  • Java.io - DataOutputStream
  • Java.io - File
  • Java.io - FileDescriptor
  • Java.io - FileInputStream
  • Java.io - FileOutputStream
  • Java.io - FilePermission
  • Java.io - FileReader
  • Java.io - FileWriter
  • Java.io - FilterInputStream
  • Java.io - FilterOutputStream
  • Java.io - FilterReader
  • Java.io - FilterWriter
  • Java.io - InputStream
  • Java.io - InputStreamReader
  • Java.io - LineNumberInputStream
  • Java.io - LineNumberReader
  • Java.io - ObjectInputStream
  • Java.io - ObjectInputStream.GetField
  • Java.io - ObjectOutputStream
  • io - ObjectOutputStream.PutField
  • Java.io - ObjectStreamClass
  • Java.io - ObjectStreamField
  • Java.io - OutputStream
  • Java.io - OutputStreamWriter
  • Java.io - PipedInputStream
  • Java.io - PipedOutputStream
  • Java.io - PipedReader
  • Java.io - PipedWriter
  • Java.io - PrintStream
  • Java.io - PrintWriter
  • Java.io - PushbackInputStream
  • Java.io - PushbackReader
  • Java.io - RandomAccessFile
  • Java.io - Reader
  • Java.io - SequenceInputStream
  • Java.io - SerializablePermission
  • Java.io - StreamTokenizer
  • Java.io - StringBufferInputStream
  • Java.io - StringReader
  • Java.io - StringWriter
  • Java.io - Writer
  • Java.io - Interfaces
  • Java.io - Exceptions
  • Java.io package Useful Resources
  • Java.io - Discussion
Selected Reading
  • UPSC IAS Exams Notes
  • Developer's Best Practices
  • Questions and Answers
  • Online Resume Builder
  • HR Interview Questions
  • Computer Glossary
  • Who is Who

Java - StringBufferInputStream class



Previous
Quiz
Next

Introduction

The Java 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.

Note

This class has been deprecated by Oracle and should not be used any more. It is preferred to use StringReader class instead.

Class declaration

Following is the declaration for Java.io.StringBufferInputStream class −

public class StringBufferInputStream
   extends InputStream

Field

Following are the fields for Java.io.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.

Class constructors

Sr.No. Constructor & Description
1

StringBufferInputStream(String s)

This creates a string input stream to read data from the specified string.

Class methods

Sr.No. Method & Description
1

int available()

This method returns the number of bytes that can be read from the input stream without blocking.

2

int read()

This method reads the next byte of data from this input stream.

3

int 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.

4

void reset()

This method resets the input stream to begin reading from the first character of this input stream's underlying buffer.

5

long skip(long n)

This method skips n bytes of input from this input stream.

Methods inherited

This class inherits methods from the following classes −

  • Java.io.InputStreams
  • Java.io.Object
Tutorix - AI Tutor
Previous Quiz Next
Advertisements
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.