MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / getString

Method getString

src/org/opensourcephysics/tools/Resource.java:293–310  ·  view source on GitHub ↗

Gets a String. @return the string

()

Source from the content-addressed store, hash-verified

291 * @return the string
292 */
293 public String getString() {
294 if (string == null) {
295 StringBuffer buffer = new StringBuffer();
296 try {
297 BufferedReader in = openReader();
298 String line = in.readLine();
299 while (line != null) {
300 buffer.append(line + XML.NEW_LINE);
301 line = in.readLine();
302 }
303 in.close();
304 } catch (IOException ex) {
305 ex.printStackTrace();
306 }
307 string = buffer.toString();
308 }
309 return string;
310 }
311
312 /**
313 * Gets a String encoded with a specified encoding.

Callers 10

mainMethod · 0.95
openMethod · 0.95
importFileIntoTabMethod · 0.95
getObjectMethod · 0.95
getMetadataMethod · 0.95
getStringMethod · 0.95
getHTMLCodeMethod · 0.95
copyHTMLToOSPCacheMethod · 0.95
openMethod · 0.95
mainMethod · 0.95

Calls 4

openReaderMethod · 0.95
appendMethod · 0.65
closeMethod · 0.65
toStringMethod · 0.45

Tested by 1

mainMethod · 0.76