cache/.github/workflows
Nodoubtz 055b0bdf9d
fix: resolve InputStream to String conversion inefficiencies
Refactored multiple methods for converting InputStream to String for improved performance and memory efficiency. 
- Added BufferedReader-based implementation for handling large files.
- Optimized StringBuilder usage for character-based data.
- Simplified small file handling using Scanner.

Addresses performance issues and ensures better handling of edge cases in InputStream processing.
2025-04-12 13:02:32 -04:00
..
5codeql.yml Create 5codeql.yml 2025-03-29 16:27:42 -04:00
check-dist.yml Update check-dist node version 2023-12-14 15:30:15 +00:00
close-inactive-issues.yml Bump actions/stale from 3 to 9 2024-10-22 11:04:21 +00:00
codeql.yml Bump github/codeql-action from 2 to 3 2024-10-22 11:14:30 +00:00
dependency-review.yml Create dependency-review.yml 2025-03-29 16:55:47 -04:00
google.yml Create google.yml 2025-03-29 16:58:52 -04:00
ibm.yml Create ibm.yml 2025-03-29 16:57:59 -04:00
import java.io.*; public class InputStreamToString { public static String convertUsingStringBuilder(InputStream inputStream) throws IOException { StringBuilder result = new StringBuilder(); try (InputStreamReader reader = new InputStreamReader(inputStream)) { char[] buffer = new char[1024]; int length; while ((length = reader.read(buffer)) != -1) { result.append(buffer, 0, length); } } return result.toString(); } } fix: resolve InputStream to String conversion inefficiencies 2025-04-12 13:02:32 -04:00
import java.io.*; import java.nio.file.Files; public class InputStreamToString { public static String convertUsingFiles(InputStream inputStream) throws IOException { return new String(inputStream.readAllBytes(), "UTF-8"); } } fix: resolve InputStream to String conversion inefficiencies 2025-04-12 13:02:32 -04:00
import java.io.*; import java.util.Scanner; public class InputStreamToString { public static String convertUsingScanner(InputStream inputStream) { try (Scanner scanner = new Scanner(inputStream).useDelimiter("\\A")) { return scanner.hasNext() ? scanner.next() : ""; } } } fix: resolve InputStream to String conversion inefficiencies 2025-04-12 13:02:32 -04:00
import java.io.*; import java.util.stream.Collectors; public class InputStreamToString { public static String convertUsingBufferedReader(InputStream inputStream) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { return reader.lines().collect(Collectors.joining(System.lineSeparator())); } } } fix: resolve InputStream to String conversion inefficiencies 2025-04-12 13:02:32 -04:00
import java.io.*; import org.apache.commons.io.IOUtils; public class InputStreamToString { public static String convertUsingIOUtils(InputStream inputStream) throws IOException { return IOUtils.toString(inputStream, "UTF-8"); } } fix: resolve InputStream to String conversion inefficiencies 2025-04-12 13:02:32 -04:00
issue-opened-workflow.yml Remove actions to add new PRs and issues to a project board 2023-06-12 13:10:52 -05:00
licensed.yml Update workflows to use reusable-workflows (#1066) 2023-01-17 17:27:27 +05:30
manual.yml Create manual.yml 2025-03-29 17:00:04 -04:00
npm-publish-github-packages.yml Create npm-publish-github-packages.yml 2025-03-29 16:57:13 -04:00
npm-publish.yml Create npm-publish.yml 2025-03-29 16:56:36 -04:00
pr-opened-workflow.yml Remove actions to add new PRs and issues to a project board 2023-06-12 13:10:52 -05:00
publish-immutable-actions.yml Update publish-immutable-actions.yml 2025-02-18 17:43:49 -05:00
release-new-action-version.yml Update release-new-action-version.yml 2025-03-29 17:59:39 -04:00
static.yml Create static.yml 2025-03-29 16:59:26 -04:00
webpack.yml Create webpack.yml 2025-03-21 22:19:25 -04:00
workflow.yml Bump actions/setup-node from 3 to 4 2024-10-22 11:12:37 +00:00