Questions tagged [writer]

an abstract class, interface or naming convention which is used to state that the given object is used to write data to a file, stream, device or other destination

A Writer clause is often used as a part of a name of an object in object-oriented programming. Good examples are BufferedWriter from Java 6 or StreamWriter from C#.

Abstract writers are often defined as interfaces or abstract classes to provide means of making the process of writing separable from what is being written. In Java or .NET there are Writer implementations for files, network connections and, more general, streams.

456 questions
-3
votes
2 answers

How to understand "!string.IsNullOrWhiteSpace(s)" syntax?

Well, I know in fact that "!" means NOT, and I quite understand the "IsNullOrWhiteSpace" function destination. But once upon, when I surfed through the Internet in terms of finding how to delete whitespaces, I've faced that kind of syntax: if…
dima_mayd
  • 55
  • 8
-3
votes
4 answers

java why with general imports not compiling

I wrote a program that writes a line to a file. When I use more general imports, it doesn't compile while with these imports it works: import java.nio.file.*; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import…
Liz
  • 11
  • 2
-3
votes
1 answer

Where does StreamWriter store data stream if using or dispose is not used?

I used StreamWriter in my code without using or dispose to create a csv file. It worked fine at first but it always generated same file which it generated the first time I ran my code. Even if I changed Data selection, it was same file. Then I…
-4
votes
1 answer

golang io.writer new line after finished writing string

I have the following code that uses a package to draw a progress bar type tmpStruct struct { } func (t *tmpStruct) Write(p []byte) (n int, err error) { fmt.Fprintf(os.Stdout, "%s", string(p)) return len(p), nil } func…
amlwwalker
  • 3,161
  • 4
  • 26
  • 47
-4
votes
1 answer

java.net.MalformedURLException: no protocol: XML

I am trying to output an XML String into a .xml file for debugging purpose. My String looks like this: System.out.println("xmlString = \n" + xmlString); =========================================================== INFO: xmlString =
user2741620
  • 305
  • 2
  • 7
  • 21
-4
votes
1 answer

optimizing a file making program

I currently have a working program that creates a file of any desired size by populating it with zeroes. This is great but the size of the files I need to do this for are Gigabytes, and this method would take forever in order do do this. If anyone…
user2007843
  • 609
  • 1
  • 12
  • 30
1 2 3
30
31