Questions tagged [stringreader]

84 questions
0
votes
1 answer

Reusable Java StringReader

Is there any way of implementing a StringReader class that allows reusing the same StringReader (or similar functionality) object with more than one strings, without changing any of its functionality (methods)? For example, such a Java class (say,…
PNS
  • 17,431
  • 26
  • 86
  • 131
0
votes
0 answers

StringReader loaded with string yields nothing

Dim docVersion = XDocument.Load("L:\ProjectGroup\DocVersion.xml").ToString result.Data = New DataSet result.Data.ReadXml(New StringReader(docVersion)) So, at the end the dataset is empty (Nothing) as value. I tried using StreamReader as well, but I…
Syspect
  • 901
  • 6
  • 19
  • 45
0
votes
1 answer

How to get Newtonsoft.Json / Json.Net to parse past unrecognized characters?

I am trying to use Newtonsoft.Json to parse JSON logs generated from a testing station. Since the testing process may result in a slightly corrupted JSON content, I need to be able to parse through corrupt data. More specifically, when the parser…
John Yost
  • 683
  • 4
  • 17
0
votes
2 answers

Parsing CSV data

I am trying to parse a CSV file with data with no luck, i have tried a bunch of tools online and none has been able to parse the CSV file correctly. I am baffled by the fact that i am in here asking for help as one would think parsing CSV data would…
0
votes
1 answer

Output text file is not giving me underscore symbol

I am reading a text file and making some alignment changes, also removing the space in 3rd column of text file and replacing it with underscore (_) symbol. But unfortunately.. when my output generated i can see the underscore symbol is not coming…
0
votes
4 answers

Read just a part of a big string

I have a large string to read and it's always different, but one word is always the same. The word is MESSAGE, so if my string reader comes across that word it has to write that whole string to disc. I did some code but it's not working, the if…
CrBruno
  • 893
  • 8
  • 15
  • 30
0
votes
1 answer

Creating null object for input StringReader using JAXBContext

I am trying to create bean from string but unable to create as it is returning null.Here is my code public ModelAndView checkPhotoQualityRequest( @RequestBody String photoDataXml, HttpServletRequest request) { PhotoQuality photoQuality…
Pramod
  • 57
  • 10
0
votes
0 answers

Change FileWriter to OutputStreamWriter?

How do I convert the FileWriter to OutputStreamWriter? This is the directory that I stored the .java files. src/RX/example.java where RX is the package name. I inserted all the images and text files inside the same directory. Here is my working code…
Yithirash
  • 327
  • 2
  • 5
  • 17
0
votes
1 answer

String reader only work 1 time

I am working on a small test project where 99.9% of the game is in the code and 0.1% is with the visual editor. I am creating tile map for some sort of Tower Defence. each map is 5/5 and are loaded from a text file in the resources folder i dont…
0
votes
0 answers

c# StringReader, XmlReader, XSLT - Unexpected XML Declaration

I've been using this function to read XML from a string and apply an XSLT style sheets, it has been working very well for small portions of XML: private static string TransformXML(String XML, String XSLT) { string output = String.Empty; …
user2078888
  • 27
  • 1
  • 5
0
votes
1 answer

ByteArrayInputStream, SequenceInputStream, StringReader where to use

There are too many java.io classes, for some of them i really dont understand when we need them, for example: ByteArrayInputStream, ByteArrayOutputStream SequenceInputStream, PushbackInputStream, PushbackReader StringReader... I mean some real-life…
0
votes
1 answer

Using strfind in Matlab for different diagonal directions in a Matrix

Before anyone asks, this is a repost of an earlier question, but I cannot delete it because it has answers, so I am modifying it so that hopefully Daniel R will answer it! I have a grid of numbers and I want to read a string of numbers with strfind…
user3094936
  • 233
  • 6
  • 12
0
votes
2 answers

Using StringReader to read to the end of String

How can I use a StringReader in Java to read to the end of a string, where I don't know what the length of the string will be. This is how far I've gotten so far: public static boolean portForward(Device dev, int localPort, int remotePort) { …
SimonC
  • 1,149
  • 1
  • 15
  • 33
0
votes
5 answers

C# Reading particular values in a string

I have the following line from a string: colors numResults="100" totalResults="6806926" I want to extract the value 6806926 from the above string How is it possible? So far, I have used StringReader to read the entire string line by line. Then what…
user2546342
  • 51
  • 2
  • 6
0
votes
2 answers

Reading from a textarea element using StringReader ASP.NET MVC Application

Trying to read from a the html textarea element in order to perform a data conversion. my Text Area Code