Skip to content

Commit

Permalink
back port startup log from 7 to 6
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Dec 17, 2024
1 parent 641e37b commit 8059eb7
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions loader/src/main/java/lucee/loader/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileFilter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.nio.charset.Charset;
Expand Down Expand Up @@ -385,6 +388,40 @@ public static void copy(final Resource in, final Resource out) throws IOExceptio
copy(is, os);
}

@Deprecated
public static void write(File file, String string, Charset charset, boolean append) throws IOException {
if (charset == null) {
charset = UTF8;
}
Writer writer = null;
try {
writer = getWriter(file, charset, append);
writer.write(string);
}
finally {
closeEL(writer);
}
}

@Deprecated
public static Writer getWriter(File file, Charset charset, boolean append) throws IOException {
OutputStream os = null;
try {
os = new FileOutputStream(file, append);
}
catch (IOException ioe) {
closeEL(os);
throw ioe;
}
return getWriter(os, charset);
}

@Deprecated
public static Writer getWriter(OutputStream os, Charset charset) throws IOException {
if (charset == null) charset = UTF8;
return new BufferedWriter(new OutputStreamWriter(os, charset));
}

/**
* @deprecated use instead CFMLEngineFactory.getInstance().getStringUtil(). toVariableName (...)
* @param str input string
Expand Down

0 comments on commit 8059eb7

Please sign in to comment.