1
2
3
4
5 package com.jcabi.manifests;
6
7 import java.io.ByteArrayInputStream;
8 import java.io.InputStream;
9 import java.nio.charset.StandardCharsets;
10 import java.util.Collection;
11 import java.util.Collections;
12
13
14
15
16
17
18
19
20 public final class StringMfs implements Mfs {
21
22
23
24
25 private final transient String source;
26
27
28
29
30
31 public StringMfs(final String src) {
32 this.source = src;
33 }
34
35 @Override
36 public Collection<InputStream> fetch() {
37 return Collections.singleton(
38 new ByteArrayInputStream(this.source.getBytes(StandardCharsets.UTF_8))
39 );
40 }
41
42 }