পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Wednesday, January 18, 2017

Java.io.PipedOutputStream Class

Introduction

The Java.io.PipedOutputStream class is a piped output stream that can be connected to a piped input stream to create a communications pipe.Following are the important points about PipedOutputStream:

  • The piped output stream is the sending end of the pipe.
  • Attempting to use both objects from a single thread is not recommended as it may deadlock the thread.
  • Data is written to a PipedOutputStream object by one thread and data is read from the connected PipedInputStream by some other thread.
  • The pipe is said to be broken if a thread that was reading data bytes from the connected piped input stream is no longer alive.

Class declaration

Following is the declaration for Java.io.PipedOutputStream class:
public class PipedOutputStream
  extends OutputStream

Class constructors

S.N. Constructor & Description
1 PipedOutputStream()
This creates a piped output stream that is not yet connected to a piped input stream.
2 PipedOutputStream(PipedInputStream snk)
This creates a piped output stream connected to the specified piped input stream.

Class methods

S.N. Method & Description
1 void close()
This method closes this piped output stream and releases any system resources associated with this stream.
2 void connect(PipedInputStream snk)
This method connects this piped output stream to a receiver.
3 void flush()
This method flushes this output stream and forces any buffered output bytes to be written out.
4 void write(byte[] b, int off, int len)
This method writes len bytes from the specified byte array starting at offset off to this piped output stream.
5 void write(int b)
This method writes the specified byte to the piped output stream.

Methods inherited

This class inherits methods from the following classes:
  • Java.io.OutputStream
  • Java.io.Object

No comments:

Post a Comment