Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

27
LINES

< > BotCompany Repo | #1031081 // Test gzipOutputStream_syncFlush (doesn't work - file is missing gzip trailer)

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 1059K of libraries. Click here for Pure Java version (6935L/37K).

1  
!7
2  
3  
!include #1031088 // GZIPInputStream_relaxed
4  
!include #1031089 // loadGZTextFile_relaxed
5  
6  
cmodule2 > DynTestModule {
7  
  transient File file;
8  
  transient PrintWriter writer;
9  
  transient new StringBuilder buf;
10  
  
11  
  void printToFile(S s) {
12  
    writer.print(s);
13  
    writer.flush();
14  
    buf.append(s);
15  
    assertEqualsVerbose(str(buf), loadGZTextFile_relaxed(file));
16  
  }
17  
  
18  
  void test {
19  
    file = programFile("test.log.gz");
20  
    deleteFile(file);
21  
    writer = printWriter(gzipOutputStream_syncFlush(file));
22  
    printToFile("Hello\n");
23  
    printToFile("world\n");
24  
    writer.close();
25  
    printFileInfo(file);
26  
  }
27  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031081
Snippet name: Test gzipOutputStream_syncFlush (doesn't work - file is missing gzip trailer)
Eternal ID of this version: #1031081/7
Text MD5: c351585fa09a00486c45d3b20b036f52
Transpilation MD5: 06520b9aba37fe6f7faa026e06bdd39f
Author: stefan
Category: javax / io
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-04-30 23:51:39
Source code size: 639 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 197 / 310
Version history: 6 change(s)
Referenced in: [show references]