Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Stream that can be read and write (thread safe)?

  1. #1
    Junior Member
    Join Date
    Sep 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Stream that can be read and write (thread safe)?

    Is there a (Netty or JDK8 or ThirdParty) stream (or whatever its name should be) that can be both read and write and it is thread safe (only read or only write at the same time)? It should have both read(ByteBuf) and write(ByteBuf) or both read(byte[])) and write(byte[]))?

    I have scenario where multiple components should process a stream. For performance reasons those components run in their own threads and read some amount of bytes to be processed.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Stream that can be read and write (thread safe)?

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

    If you find it, let us know.

Similar Threads

  1. instance variable are not thread safe i need the code for that
    By dhasija in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 10th, 2014, 02:39 AM
  2. How do you make servlet thread-safe?
    By diyaots in forum Web Frameworks
    Replies: 3
    Last Post: April 15th, 2013, 12:18 PM
  3. Singleton thread safe
    By LorenzoR in forum Threads
    Replies: 1
    Last Post: October 4th, 2011, 12:41 PM
  4. Make servlet thread safe.
    By codeJ in forum Java Servlet
    Replies: 1
    Last Post: January 5th, 2011, 11:28 AM
  5. DateFormat is not thread safe
    By trueacumen in forum Threads
    Replies: 5
    Last Post: August 15th, 2009, 02:16 AM