Questions tagged [buffered]

96 questions
4
votes
4 answers

How to convert InputStream to Reader in java?

reader = new BufferedReader(new InputStreamReader(inputStream)) reader = new InputStreamReader(new BufferedInputStream(inputStream)) which is better? why?
XenoAmess
  • 345
  • 1
  • 3
  • 12
4
votes
2 answers

Smooth Drawing using Java2d without the Opengl or Direct3d Pipelines?

I can't figure out a way to get smooth movement or animation of anything using Java2d when the opengl and direct3d pipelines are disabled (by invoking the vm with -Dsun.java2d.d3d=false and -Dsun.java2d.opengl=false) The quick and dirty code below…
user1846344
3
votes
3 answers

Is Stream.Read buffered when doing network I/O?

So I was recently doing some work, when somebody told me that if doing a Stream.Read on a network stream that is obtained from calling one of .NET's GetResponseStream on a WebResponse or those are buffered. He was saying that if you were to put a…
halivingston
  • 3,727
  • 4
  • 29
  • 42
3
votes
1 answer

Is there a function to specify a message when reading in a file if the line doesn’t follow a certain pattern

I am making a Class called Book that represents books that have a title, an author and a year, when they won the award. I have a method getList which should read in the data from a csv file and if a line doesn’t follow the pattern title,author,year…
3
votes
1 answer

Why is python process with unbuffered output scrambled using xargs --max-procs?

I'm executing multiple python processes like such: find /path/to/logfiles/*.gz | xargs -n1 -P4 python logparser.py and the output is occasionally scrambled. The output stream is unbuffered and the size of the the write is smaller than the default…
2
votes
2 answers

Is buffered io using stdio.h async?

I understand that one of the advantages of using stdio.h FILE over direct read()/write() is the buffering, interrupt handling, etc. So, as I understand, all the fwrite()s get buffered up until I do an fclose(). So far, so good. Now, when I do an…
Benito Ciaro
  • 1,718
  • 12
  • 25
2
votes
1 answer

SSH with Paramiko : failing to read data

Below is my driver information where I need to pull the data(Firmware Version) using ssh script as show below. ncmdvstk:~ $ ssh admin@153.88.127.21 Password: MSM760 V. 5.3.6.18-01-9124 (C) 2010 Hewlett-Packard Development Company, L.P. CLI>…
vinod reddy
  • 133
  • 1
  • 2
  • 12
2
votes
0 answers

Resize Buffered Image without creating new instance (java)

I was wondering if there is a way to resize a BufferedImage without creating a new instance of another image. I am wondering this because I think that it will be inefficient to create a new image each time I want to resize a BufferedImage for my…
MC Duder
  • 29
  • 2
2
votes
2 answers

Program freezes on bufferedreader close

Program freezes when closing buffered reader. Using forge modding API for minecraft, however I've had this issue before with standalone server side code. This particular code worked fine and then randomly started giving me this issue, not sure how…
2
votes
2 answers

Receive terminal up/down keys using QTcpSocket

I have created a simple telnet server using QTcpSocket. It works great when the (telnet) client sends a command one line at a time. I would now like my telnet server to trap the up/down arrow keys so that I can recall previous commands from the…
TSG
  • 4,242
  • 9
  • 61
  • 121
2
votes
1 answer

How to fix java.io.FileNotFoundException: Response: '404: Not Found' for url: 'http://localhost:7001/Socket-war/Servlet'

I am using the code below to invoke a servlet from my Java class : URL url = new URL( "http://localhost:7001/Socket-war/Servlet" ); new BufferedReader(new InputStreamReader(url.openStream())); Getting an Exception: …
Developer
  • 161
  • 2
  • 3
  • 15
2
votes
1 answer

way to implement buffered IO using log4j2

Is there any way to implement file appender using log4j2, which will store the log in memory for particular size and after that it will write the log to the file(local/remote). Is there any way to achieve this? In log4j2 documentation: The…
Chandra Sekhar
  • 16,256
  • 10
  • 67
  • 90
2
votes
5 answers

Search for Binary Pattern in C (Read buffered binary file)

Hey there. I'm trying to write a small program that will read the four following bytes after the last occurrence of "0xFF 0xC0 0x00 0x11" which can be converted easily to binary or decimal. The purpose is that the 2-5 bytes following the last…
Supernovah
  • 1,946
  • 12
  • 34
  • 50
2
votes
2 answers

HTML5 Media Element - Difference between SEEKABLE and BUFFERED?

I was wondering what is the difference in HTML5 media elements between the media.seekable and media.buffered?
Nirlah
  • 345
  • 2
  • 16
1
vote
1 answer

Buffered Writer loads corrupt data when new file created

Basically, I'm trying to capture the accelerometer data into a txt file. The code writes the accel data into a string, and then updates everytime it changes which is often. I included a toggle button which starts the logging of the data and is…
johann316
  • 63
  • 1
  • 10