本文整理汇总了Java中org.databene.commons.SystemInfo.getFileEncoding方法的典型用法代码示例。如果您正苦于以下问题:Java SystemInfo.getFileEncoding方法的具体用法?Java SystemInfo.getFileEncoding怎么用?Java SystemInfo.getFileEncoding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.databene.commons.SystemInfo
的用法示例。
在下文中一共展示了SystemInfo.getFileEncoding方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: XMLFileGenerator
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
public XMLFileGenerator(String schemaUri, String root, String filenamePattern, String... propertiesFiles) {
this.schemaUri = schemaUri;
this.encoding = SystemInfo.getFileEncoding();
this.filenamePattern = filenamePattern;
this.propertiesFiles = propertiesFiles;
this.root = root;
}
示例2: testUnfiltered
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
@Test
public void testUnfiltered() {
FixedWidthEntitySource source = new FixedWidthEntitySource(URI, descriptor, SystemInfo.getFileEncoding(), null, descriptors);
source.setContext(new DefaultBeneratorContext());
DataIterator<Entity> iterator = source.iterator();
assertEquals(ALICE, nextOf(iterator));
assertEquals(BOB, nextOf(iterator));
assertEquals(CHARLY, nextOf(iterator));
assertUnavailable(iterator);
iterator = source.iterator();
assertEquals(ALICE, nextOf(iterator));
assertEquals(BOB, nextOf(iterator));
assertEquals(CHARLY, nextOf(iterator));
assertUnavailable(iterator);
}
示例3: testFiltered
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
@Test
public void testFiltered() {
FixedWidthEntitySource source = new FixedWidthEntitySource(URI, descriptor, SystemInfo.getFileEncoding(), "Bob.*", descriptors);
source.setContext(new DefaultBeneratorContext());
DataIterator<Entity> iterator = source.iterator();
assertEquals(BOB, nextOf(iterator));
assertUnavailable(iterator);
iterator = source.iterator();
assertEquals(BOB, nextOf(iterator));
assertUnavailable(iterator);
}
示例4: testMissingColumnSpec
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
@Test(expected = InvalidGeneratorSetupException.class)
public void testMissingColumnSpec() {
FixedWidthEntitySource source = new FixedWidthEntitySource(URI, descriptor, SystemInfo.getFileEncoding(), null);
source.setContext(new DefaultBeneratorContext());
DataIterator<Entity> iterator = source.iterator();
assertEquals(BOB, nextOf(iterator));
}
示例5: setEncoding
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
public void setEncoding(String encoding) {
this.encoding = (encoding != null ? encoding : SystemInfo.getFileEncoding());
if (this.encoding == null)
this.encoding = DEFAULT_FILE_ENCODING;
}
示例6: FixedWidthEntitySource
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
public FixedWidthEntitySource() {
this(null, null, SystemInfo.getFileEncoding(), null);
}
示例7: CSVEntitySource
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
public CSVEntitySource() {
this(null, null, SystemInfo.getFileEncoding());
}
示例8: TextFileExporter
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
public TextFileExporter(String uri, String encoding, String lineSeparator) {
this.uri = (uri != null ? uri : "export.txt");
this.encoding = (encoding != null ? encoding : SystemInfo.getFileEncoding());
this.lineSeparator = (lineSeparator != null ? lineSeparator : SystemInfo.getLineSeparator());
this.append = false;
}
示例9: TokenCombiner
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
public TokenCombiner(String uri, boolean unique) {
this(uri, unique, ',', SystemInfo.getFileEncoding(), false);
}
示例10: WeightedCSVSampleGenerator
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
public WeightedCSVSampleGenerator(String url) {
this(url, SystemInfo.getFileEncoding());
}
示例11: WeightedDatasetCSVGenerator
import org.databene.commons.SystemInfo; //导入方法依赖的package包/类
public WeightedDatasetCSVGenerator(Class<E> generatedType, String filenamePattern, String datasetName, String nesting, boolean fallback) {
this(generatedType, filenamePattern, ',', datasetName, nesting, fallback, SystemInfo.getFileEncoding());
}