MCPcopy Create free account
hub / github.com/PCGen/pcgen / write

Method write

code/src/java/pcgen/io/FileAccess.java:130–156  ·  view source on GitHub ↗

Write to the output @param output @param aString

(Writer output, String aString)

Source from the content-addressed store, hash-verified

128 * @param aString
129 */
130 public static void write(Writer output, String aString)
131 {
132
133 String outputString = aString;
134
135 // If there is nothing to write, then return gracefully
136 if (aString == null)
137 {
138 return;
139 }
140
141 // Trim the string to the length of maxLength
142 if ((maxLength > 0) && (aString.length() > maxLength))
143 {
144 outputString = aString.substring(0, maxLength);
145 }
146
147 try
148 {
149 output.write(outputString);
150 }
151 catch (IOException exception)
152 {
153 ShowMessageDelegate.showMessageDialog(exception.getMessage(), Constants.APPLICATION_NAME,
154 MessageType.ERROR);
155 }
156 }
157}

Callers 10

saveMethod · 0.95
encodeWriteMethod · 0.95
outputNonTokenMethod · 0.95
replaceTokenMethod · 0.95
replaceTokenForDforMethod · 0.95
replaceTokenOIFMethod · 0.95
writeMethod · 0.95
processPipedLineMethod · 0.95
doPartyForTokenMethod · 0.95
outputMethod · 0.95

Calls 3

showMessageDialogMethod · 0.95
writeMethod · 0.65
getMessageMethod · 0.65

Tested by

no test coverage detected