Questions tagged [stringreader]
84 questions
2
votes
2 answers
Java Tokenization: Treat Anything Separated by an Underscore as One Word
I have a very simple tokenizer using StreamTokenizer, which will convert mathematical expressions into their individual components (below). The problem that I am having, is if there is a variable in the expression called T_1, it will split into…
Archetype90
- 171
- 3
- 18
2
votes
4 answers
Using Android SAXParser, one my my XML Elements is mysteriously breaking in half
And its not '&'
Im using the SAXParser object do parse the actual XML.
This is normally done by passing a URL to the XMLReader.Parse method.
Because my XML is coming from a POST request to a webservice, I am saving that result as a String and then…
FauxReal
- 4,634
- 4
- 18
- 17
2
votes
0 answers
stream handler to @lob field in jpa entity
Is there posibility to get buffered stream directly from db CLOB data mapped in JPA by String field annotted by @Lob. I want to read field line by line without getting all field to my service.
I'am using:
BufferedReader reader = new…
bmlynarczyk
- 798
- 8
- 19
2
votes
3 answers
Append Text with StringReader (After reader.ReadLine())
Right now I'm building a game application using c#, which will require loading from text file for the game script. (It's quite a simple visual novel game)
Now when the main form loads, i load the script from the file script.txt
And i declared…
Ken Timothy
- 637
- 7
- 24
2
votes
3 answers
How can I get the next char in my string with the stringreader in Java?
Consider this code:
public static void main (String[] args) {
String name = "(My name is Bob)(I like computers)"
StringReader s = new StringReader(name);
try {
// This is the for loop that I don't know
for () {
…
user1420042
- 1,619
- 8
- 33
- 51
1
vote
2 answers
Get parts of a string - C# .NET Core 3.1
I have a string line from a log:
2020-09-07 14:41:17.268 +01:00 [Information] Hello, Serilog!
I would like to pull out the word Information from the string, however, this will change as it could be debug, or any other known logging level.
I would…
user1574598
- 3,208
- 6
- 25
- 48
1
vote
0 answers
How to apply a filter to a StringReader in a memory efficient way?
I wrote the following older piece of code a while back. The premise behind this, was this was the take a regular expression and verify if it matches a criteria. If it does, then allow it to flow through along in the stream. The code is poor when…
paneerlovr
- 111
- 1
1
vote
1 answer
StringReader not "reading" given string object
I have a table in a mysql database, where i have stored many XML strings.
The XML strings are like this:
- Payroll
administration
CEO
…
Dany
- 131
- 3
- 16
1
vote
3 answers
StringReader not "exiting"/breaking
I am experiencing a problem with the below code… When I run it the code never exits. I have tried to debug this for about an hour and I am at a complete loss as to what the problem is. OutputDebug(); is essentially like…
PixxlMan
- 69
- 1
- 3
- 11
1
vote
1 answer
Does LoadString allocate memory for the string it writes to?
I am new in c++ and need some help.
I created a resource-only dll that contains strings, i need to use this dll in a different project to read the stored strings.
I wrote the following functions to read the read the strings:
LPTSTR…
Natalie Polishuk
- 135
- 10
1
vote
2 answers
Java: How to read only int data from text file to perform calculation?
I use a button to save user input to a text file and now i want to retrieve it to do a calculation.
The text file is gets updated and new values are added.
Here is an e.g of how the text file looks:
monday : 1 tuesday: 2 wednessday: 3
...etc
When…
Jacques Naudé
- 40
- 8
1
vote
2 answers
StreamTokenizer Behavior for division operator "/"
Take a look at the demo code for StreamTokenizer here. It doesn't seems to work properly when there is / in string(Just add / in between string in StringReader). Here is the code from mentioned link,
StreamTokenizer tokenizer = new StreamTokenizer(
…
user148865
- 286
- 1
- 4
- 15
1
vote
2 answers
mark() method of StringReader
My question pertains to the mark() method of Java's StringReader. Here is my scenario:
StringReader reader = new StringReader("Test123");
reader.mark(0);
boolean bool = doSomething(reader)//reads from reader with calls to mark() inside
if (bool ==…
jkossis
- 119
- 1
- 9
1
vote
3 answers
Java StringReader ready()
Hi this is my first question here so if it is for some reason does not obey the rules, turns out to be a duplicate or whatever, please tell me kindly (not that I have any reputation to lose in the first place)
Anyway, I actually have sort of 2…
digawp
- 304
- 2
- 13
1
vote
2 answers
Read values from a non-delimited string into class object
I have a string with the following structure:
Student Name________AgeAddress_______________________Bithday___Lvl
Example:
Jonh Smith 016Some place in NY, USA 01/01/2014L01
As you can see, there is no delimited character like…
Plata
- 45
- 5