text string | label int64 |
|---|---|
[CLS] public static boolean copyDataToNewTable(EboContext p_eboctx, String srcTableName, String destTableName, String where, boolean log, int mode) throws boRuntimeException {
srcTableName = srcTableName.toUpperCase();
destTableName = destTableName.toUpperCase();
Connection cn = null;
Co... | 1 |
[CLS] private void displayDiffResults() throws IOException {
File outFile = File.createTempFile("diff", ".htm");
outFile.deleteOnExit();
FileOutputStream outStream = new FileOutputStream(outFile);
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(outStream));
out.wri... | 1 |
[CLS] public void actionPerformed(ActionEvent evt) {
try {
File tempFile = new File("/tmp/controler.xml");
File f = new File("/tmp/controler-temp.xml");
BufferedInputStream copySource = new BufferedInputStream(new FileInputStream(tempFile));
Bu... | 1 |
[CLS] public Object execute(ExecutionEvent event) throws ExecutionException {
final List<InformationUnit> informationUnitsFromExecutionEvent = InformationHandlerUtil.getInformationUnitsFromExecutionEvent(event);
Shell activeShell = HandlerUtil.getActiveShell(event);
DirectoryDialog fd = new Dire... | 0 |
[CLS] private static void readAndRewrite(File inFile, File outFile) throws IOException {
ImageInputStream iis = ImageIO.createImageInputStream(new BufferedInputStream(new FileInputStream(inFile)));
DcmParser dcmParser = DcmParserFactory.getInstance().newDcmParser(iis);
Dataset ds = DcmObjectFact... | 1 |
[CLS] public static void copy(String fromFileName, String toFileName) throws IOException {
File fromFile = new File(fromFileName);
File toFile = new File(toFileName);
if (!fromFile.exists()) throw new IOException("FileCopy: " + "no such source file: " + fromFileName);
if (!fromFile.isFil... | 1 |
[CLS] public boolean login() {
if (super.isAuthenticated()) return true;
try {
if (client == null) {
client = new FTPClient();
FTPClientConfig config = new FTPClientConfig();
client.configure(config);
}
if (!client.isCon... | 0 |
[CLS] public static String md5hash(String data) {
MessageDigest digest;
try {
digest = java.security.MessageDigest.getInstance("MD5");
digest.update(data.getBytes());
return new BigInteger(1, digest.digest()).toString(16);
} catch (NoSuchAlgorithmException e) ... | 0 |
[CLS] public void download() {
try {
URL url = new URL(srcURL + src);
URLConnection urlc = url.openConnection();
InputStream is = urlc.getInputStream();
BufferedInputStream bis = new BufferedInputStream(is);
FileOutputStream fos = new FileOutputStream(... | 0 |
[CLS] private static boolean moveFiles(String sourceDir, String targetDir) {
boolean isFinished = false;
boolean fileMoved = false;
File stagingDir = new File(sourceDir);
if (!stagingDir.exists()) {
System.out.println(getTimeStamp() + "ERROR - source directory does not exist.... | 1 |
[CLS] public void testTransactions0010() throws Exception {
Statement stmt = con.createStatement();
stmt.executeUpdate("create table #t0010 " + " (i integer not null, " + " s char(10) not null) ");
con.setAutoCommit(false);
PreparedStatement pstmt = con.prepareStatement("... | 0 |
[CLS] public void notifyIterationEnds(final IterationEndsEvent event) {
log.info("moving files...");
File source = new File("deqsim.log");
if (source.exists()) {
File destination = new File(Controler.getIterationFilename("deqsim.log"));
if (!IOUtils.renameFile(source, des... | 1 |
[CLS] private BundleURLClassPath createBundleURLClassPath(Bundle bundle, Version version, File bundleFile, File cache, boolean alreadyCached) throws Exception {
String bundleClassPath = (String) bundle.getHeaders().get(Constants.BUNDLE_CLASSPATH);
if (bundleClassPath == null) {
bundleClassPa... | 0 |
[CLS] public static boolean decodeFileToFile(String infile, String outfile) {
boolean success = false;
java.io.InputStream in = null;
java.io.OutputStream out = null;
try {
in = new Base64.InputStream(new java.io.BufferedInputStream(new java.io.FileInputStream(infile)), Base6... | 1 |
[CLS] public static void copyFile(File in, File out) throws IOException {
FileChannel inChannel = new FileInputStream(in).getChannel();
FileChannel outChannel = new FileOutputStream(out).getChannel();
try {
inChannel.transferTo(0, inChannel.size(), outChannel);
} catch (IOExc... | 1 |
[CLS] public boolean delMail(MailObject mail) throws NetworkException, ContentException {
HttpClient client = HttpConfig.newInstance();
HttpGet get = new HttpGet(HttpConfig.bbsURL() + HttpConfig.BBS_MAIL_DEL + mail.getId());
try {
HttpResponse response = client.execute(get);
... | 0 |
[CLS] public static void save(String from, String recipient, InputStream in, MimeMessage message) throws IOException, MessagingException, DocumentVideException {
ConversationManager conversationManager = FGDSpringUtils.getConversationManager();
conversationManager.beginConversation();
FGDDelegat... | 1 |
[CLS] @Override
public void execute(String[] args) throws Exception {
Options cmdLineOptions = getCommandOptions();
try {
GnuParser parser = new GnuParser();
CommandLine commandLine = parser.parse(cmdLineOptions, TolvenPlugin.getInitArgs());
String srcRepositoryUR... | 1 |
[CLS] public void echo(HttpRequest request, HttpResponse response) throws IOException {
InputStream in = request.getInputStream();
if ("gzip".equals(request.getField("Content-Encoding"))) {
in = new GZIPInputStream(in);
}
IOUtils.copy(in, response.getOutputStream());
} [S... | 1 |
[CLS] void readData(URL url) throws IOException {
int i = 0, j = 0, k = 0;
double xvalue, yvalue;
double xindex, yindex;
InputStream is = url.openStream();
is.mark(0);
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
... | 0 |
[CLS] public static void copyFile(String source, String destination, TimeSlotTracker timeSlotTracker) {
LOG.info("copying [" + source + "] to [" + destination + "]");
BufferedInputStream sourceStream = null;
BufferedOutputStream destStream = null;
try {
File destinationFile =... | 1 |
[CLS] private byte[] digestPassword(byte[] salt, String password) throws AuthenticationException {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(salt);
md.update(password.getBytes("UTF8"));
return md.digest();
} catch (Exception e) {... | 0 |
[CLS] @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.listview);
HttpGet request = new HttpGet(SERVICE_URI + "/json/getallpersons");
request.setHeader("Accept", "application/json");
request.setHeader("Con... | 0 |
[CLS] public URL getResource(String path) throws MalformedURLException {
if (!path.startsWith("/")) throw new MalformedURLException("Path '" + path + "' does not start with '/'");
URL url = new URL(myResourceBaseURL, path.substring(1));
InputStream is = null;
try {
is = url.o... | 0 |
[CLS] public static String get(String strUrl) {
try {
URL url = new URL(strUrl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(true);
conn.setAllowUserInt... | 0 |
[CLS] @Test
public void testSecondary() throws Exception {
ConnectionFactoryIF cf = new DefaultConnectionFactory(PropertyUtils.loadProperties(StreamUtils.getInputStream(propfile)), false);
Connection conn = cf.requestConnection();
try {
Statement stm = conn.createStatement();
... | 0 |
[CLS] public void run() {
Pair p = null;
try {
while ((p = queue.pop()) != null) {
GetMethod get = new GetMethod(p.getRemoteUri());
try {
get.setFollowRedirects(true);
get.setRequestHeader("Mariner-Application", "prerend... | 1 |
[CLS] public void filter(File source, File destination, MNamespace mNamespace) throws Exception {
BufferedReader reader = new BufferedReader(new FileReader(source));
BufferedWriter writer = new BufferedWriter(new FileWriter(destination));
int line = 0;
int column = 0;
Stack parse... | 1 |
[CLS] public static void main(String[] args) throws IOException {
File fileIn = new File("D:\\zz_c\\study2\\src\\study\\io\\A.java");
InputStream fin = new FileInputStream(fileIn);
PipedInputStream pin = new PipedInputStream();
PipedOutputStream pout = new PipedOutputStream();
po... | 1 |
[CLS] public Object construct() {
String fullName = lRegatta.getSaveDirectory() + lRegatta.getSaveName();
System.out.println(MessageFormat.format(res.getString("MainMessageBackingUp"), new Object[] { fullName + BAK }));
try {
FileInputStream fis = new ... | 1 |
[CLS] private Document saveFile(Document document, File file) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat(Constants.DATEFORMAT_YYYYMMDD);
List<Preference> preferences = prefService.findAll();
if (preferences != null && !preferences.isEmpty()) {
Preference preferenc... | 1 |
[CLS] public static boolean decodeFileToFile(String infile, String outfile) {
boolean success = false;
java.io.InputStream in = null;
java.io.OutputStream out = null;
try {
in = new Base64.InputStream(new java.io.BufferedInputStream(new java.io.FileInputStream(infile)), Base6... | 0 |
[CLS] public boolean isValid(WizardContext context) {
if (serviceSelection < 0) {
return false;
}
ServiceReference selection = (ServiceReference) serviceList.getElementAt(serviceSelection);
if (selection == null) {
return false;
}
String function =... | 0 |
[CLS] protected void doBackupOrganizeType() throws Exception {
Connection con = null;
PreparedStatement ps = null;
ResultSet result = null;
String strSelQuery = "SELECT organize_type_id,organize_type_name,width " + "FROM " + Common.ORGANIZE_TYPE_TABLE;
String strInsQuery = "INSER... | 1 |
[CLS] private boolean writeResource(PluginProxy eclipseInstallPlugin, ResourceProxy translation, LocaleProxy locale) throws Exception {
String translationResourceName = determineTranslatedResourceName(translation, locale);
String pluginNameInDirFormat = eclipseInstallPlugin.getName().replace(Messages.ge... | 0 |
[CLS] private void invokeTest(String queryfile, String target) {
try {
String query = IOUtils.toString(XPathMarkBenchmarkTest.class.getResourceAsStream(queryfile)).trim();
String args = EXEC_CMD + " \"" + query + "\" \"" + target + '"';
System.out.println("Invoke command: \n ... | 1 |
[CLS] protected void convertInternal(InputStream inputStream, DocumentFormat inputFormat, OutputStream outputStream, DocumentFormat outputFormat) {
File inputFile = null;
File outputFile = null;
try {
inputFile = File.createTempFile("document", "." + inputFormat.getFileExtension());
... | 1 |
[CLS] public static String encripty(String toEncripty) {
if (toEncripty != null) {
try {
synchronized (toEncripty) {
java.security.MessageDigest md = java.security.MessageDigest.getInstance("MD5");
md.update(toEncripty.getBytes());
... | 0 |
[CLS] public static void copyFile(File sourceFile, File targetFile) throws FileCopyingException {
try {
FileInputStream inputStream = new FileInputStream(sourceFile);
FileOutputStream outputStream = new FileOutputStream(targetFile);
FileChannel readableChannel = inputStream.g... | 1 |
[CLS] public static long writeInputStreamToOutputStream(final InputStream in, final OutputStream out) {
long size = 0;
try {
size = IOUtils.copyLarge(in, out);
} catch (IOException e1) {
e1.printStackTrace();
}
return size;
} [SEP] public static void c... | 1 |
[CLS] private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
if ((this.jTree2.getSelectionPath() == null) || !(this.jTree2.getSelectionPath().getLastPathComponent() instanceof StyleTreeNode)) {
Msg.showMsg("Devi selezionare lo stile sotto il quale caricare la ricetta!", this);
... | 1 |
[CLS] private void copyFiles(File oldFolder, File newFolder) {
for (File fileToCopy : oldFolder.listFiles()) {
File copiedFile = new File(newFolder.getAbsolutePath() + "\\" + fileToCopy.getName());
try {
FileInputStream source = new FileInputStream(fileToCopy);
... | 1 |
[CLS] private String fetchHtml(URL url) throws IOException {
URLConnection connection;
if (StringUtils.isNotBlank(proxyHost) && proxyPort != null) {
Proxy proxy = new Proxy(Proxy.Type.HTTP, InetSocketAddress.createUnresolved(proxyHost, proxyPort));
connection = url.openConnection... | 0 |
[CLS] private void copyFile(String path) {
try {
File srcfile = new File(srcdir, path);
File destfile = new File(destdir, path);
File parent = destfile.getParentFile();
if (!parent.exists()) {
parent.mkdirs();
}
FileInputStr... | 1 |
[CLS] public Model read(String uri, String base, String lang) {
try {
URL url = new URL(uri);
return read(url.openStream(), base, lang);
} catch (IOException e) {
throw new OntologyException("I/O error while reading from uri " + uri);
}
} [SEP] public stat... | 0 |
[CLS] public SingularValueDecomposition(Matrix Arg) {
double[][] A = Arg.getArrayCopy();
m = Arg.getRowDimension();
n = Arg.getColumnDimension();
int nu = Math.min(m, n);
s = new double[Math.min(m + 1, n)];
U = new double[m][nu];
V = new double[n][n];
doub... | 0 |
[CLS] public void copyContent(long mailId1, long mailId2) throws Exception {
File file1 = new File(this.getMailDir(mailId1) + "/");
File file2 = new File(this.getMailDir(mailId2) + "/");
this.recursiveDir(file2);
if (file1.isDirectory()) {
File[] files = file1.listFiles();
... | 1 |
[CLS] private String loadSchemas() {
StringWriter writer = new StringWriter();
try {
IOUtils.copy(CoreOdfValidator.class.getResourceAsStream("schema_list.properties"), writer);
} catch (IOException e) {
e.printStackTrace();
}
return writer.toString();
... | 0 |
[CLS] public GEItem lookup(final int itemID) {
try {
URL url = new URL(GrandExchange.HOST + GrandExchange.GET + itemID);
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
String input;
boolean exists = false;
int i = 0;
... | 1 |
[CLS] public static void copyFile(File source, File destination) throws IOException {
FileChannel srcChannel = new FileInputStream(source).getChannel();
FileChannel destChannel = new FileOutputStream(destination).getChannel();
try {
int maxCount = (64 * 1024 * 1024) - (32 * 1024);
... | 1 |
[CLS] public static void unzipFile(File zipFile, File destFile, boolean removeSrcFile) throws Exception {
ZipInputStream zipinputstream = new ZipInputStream(new FileInputStream(zipFile));
ZipEntry zipentry = zipinputstream.getNextEntry();
int BUFFER_SIZE = 4096;
while (zipentry != null) ... | 1 |
[CLS] @Override
public ArrayList<String> cacheAgeingProcess(int numberOfDays) throws DatabaseException {
IMAGE_LIFETIME = numberOfDays;
PreparedStatement statement = null;
ArrayList<String> ret = new ArrayList<String>();
try {
statement = getConnection().prepareStatement(... | 1 |
[CLS] public static void copyFile(File srcFile, File desFile) throws IOException {
AssertUtility.notNull(srcFile);
AssertUtility.notNull(desFile);
FileInputStream fis = new FileInputStream(srcFile);
FileOutputStream fos = new FileOutputStream(desFile);
try {
FileChann... | 1 |
[CLS] public void convert(File file, String fromEncoding, String toEncoding) throws IOException {
InputStream in = new FileInputStream(file);
StringWriter cache = new StringWriter();
Reader reader = new InputStreamReader(in, fromEncoding);
char[] buffer = new char[128];
int read;... | 1 |
[CLS] public static void main(String[] args) throws Exception {
if (args.length != 2) {
System.out.println("usage: PutFromFile [properties file] [file with pmpxml]");
throw new IllegalArgumentException("Wrong number of arguments");
}
Reader is = new FileReader(args[1]);
... | 0 |
[CLS] public void run() throws Exception {
Properties buildprops = new Properties();
try {
ClassLoader cl = this.getClass().getClassLoader();
URL url = cl.getResource("build.properties");
InputStream is = url.openStream();
;
buildprops.load(is)... | 0 |
[CLS] public void run() {
URLConnection con = null;
try {
con = url.openConnection();
if ("HTTPS".equalsIgnoreCase(url.getProtocol())) {
HttpsURLConnection scon = (HttpsURLConnection) con;
try {
scon.... | 0 |
[CLS] private boolean load(URL url) {
try {
URLConnection connection = url.openConnection();
parser = new PDFParser(connection.getInputStream());
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
} [SEP] boolea... | 0 |
[CLS] private String fetchLocalPage(String page) throws IOException {
final String fullUrl = HOST + page;
LOG.debug("Fetching local page: " + fullUrl);
URL url = new URL(fullUrl);
URLConnection connection = url.openConnection();
StringBuilder sb = new StringBuilder();
Buf... | 1 |
[CLS] public void sendShape(String s) {
try {
URLConnection uc = new URL(url + "&add=" + s).openConnection();
InputStream in = uc.getInputStream();
int b;
while ((b = in.read()) != -1) {
}
in.close();
} catch (IOException ex) {
... | 0 |
[CLS] @Override
public String fetchElectronicEdition(Publication pub) {
final String url = baseURL + pub.getKey() + ".html";
logger.info("fetching pub ee from local cache at: " + url);
HttpMethod method = null;
String responseBody = "";
method = new GetMethod(url);
me... | 1 |
[CLS] private void load() throws SQLException {
Connection conn = null;
Statement stmt = null;
try {
conn = FidoDataSource.getConnection();
conn.setAutoCommit(false);
stmt = conn.createStatement();
ClearData.clearTables(stmt);
stmt.exec... | 1 |
[CLS] public void convert(File src, File dest) throws IOException {
InputStream in = new BufferedInputStream(new FileInputStream(src));
DcmParser p = pfact.newDcmParser(in);
Dataset ds = fact.newDataset();
p.setDcmHandler(ds.getDcmHandler());
try {
FileFormat format =... | 1 |
[CLS] private static String getSignature(String data) {
MessageDigest md;
try {
md = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
return "FFFFFFFFFFFFFFFF";
}
md.update(data.getBytes());
StringBuffer sb = new StringBuffe... | 1 |
[CLS] private NodeList getNodeListForDataFile(String fileName, String dataType) {
NodeList list = null;
try {
URL url = new URL(WEBSITE_PROTOCAL, WEBSITE_HOST, "/" + fileName + ".xml");
InputStream is = url.openStream();
DocumentBuilderFactory dbf = DocumentBuilderFac... | 0 |
[CLS] public static void copyFile(File src, File dest) throws IOException {
if (!src.exists()) throw new IOException("File not found '" + src.getAbsolutePath() + "'");
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(dest));
BufferedInputStream in = new BufferedInputStrea... | 1 |
[CLS] public void testClickToCallOutDirection() throws Exception {
init();
SipCall[] receiverCalls = new SipCall[receiversCount];
receiverCalls[0] = sipPhoneReceivers[0].createSipCall();
receiverCalls[1] = sipPhoneReceivers[1].createSipCall();
receiverCalls[0].listenForIncomingCa... | 0 |
[CLS] public void save() throws IOException {
CodeTimer saveTimer;
if (!dirty) {
return;
}
saveTimer = new CodeTimer("PackedFile.save");
saveTimer.setEnabled(log.isDebugEnabled());
File newFile = new File(tmpDir.getAbsolutePath() + "/" + new GUID() + ".pak");
... | 1 |
[CLS] public static void main(String[] args) throws IOException {
String uri = "hdfs://localhost:8020/user/leeing/maxtemp/sample.txt";
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(URI.create(uri), conf);
InputStream in = null;
try {
in = fs... | 1 |
[CLS] private static URL lookForDefaultThemeFile(String aFilename) {
try {
XPathFactory fabrique = XPathFactory.newInstance();
XPath environnement = fabrique.newXPath();
URL url = new URL("file:" + aFilename);
InputSource source = new InputSource(url.openStream())... | 0 |
[CLS] public static void copyFile(String source, String destination, boolean overwrite) {
File sourceFile = new File(source);
try {
File destinationFile = new File(destination);
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(sourceFile));
Buffer... | 1 |
[CLS] private static String executeGet(String urlStr) {
StringBuffer result = new StringBuffer();
try {
Authentication.doIt();
URL url = new URL(urlStr);
System.out.println("Host: " + url.getHost());
BufferedReader in = new BufferedReader(new InputStreamRe... | 0 |
[CLS] public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession(false);
if (session == null) {
log.warn("HttpProxyServlet: no session");
response.setStatus(404);
return;
... | 0 |
[CLS] public InputStream createInputStream(URI uri, Map<?, ?> options) throws IOException {
try {
URL url = new URL(uri.toString());
final URLConnection urlConnection = url.openConnection();
InputStream result = urlConnection.getInputStream();
Map<Object, Object> ... | 0 |
[CLS] public static void copyFile(File file, String pathExport) throws IOException {
File out = new File(pathExport);
FileChannel sourceChannel = new FileInputStream(file).getChannel();
FileChannel destinationChannel = new FileOutputStream(out).getChannel();
sourceChannel.transferTo(0, s... | 1 |
[CLS] public static boolean encodeFileToFile(String infile, String outfile) {
boolean success = false;
java.io.InputStream in = null;
java.io.OutputStream out = null;
try {
in = new Base64.InputStream(new java.io.BufferedInputStream(new java.io.FileInputStream(infile)), Base6... | 1 |
[CLS] protected FTPClient openFTP() throws CruiseControlException {
LOG.info("Opening FTP connection to " + targetHost);
FTPClient ftp = new FTPClient();
try {
ftp.connect(targetHost, targetPort);
if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {
t... | 0 |
[CLS] private void setInlineXML(Entry entry, DatastreamXMLMetadata ds) throws UnsupportedEncodingException, StreamIOException {
String content;
if (m_obj.hasContentModel(Models.SERVICE_DEPLOYMENT_3_0) && (ds.DatastreamID.equals("SERVICE-PROFILE") || ds.DatastreamID.equals("WSDL"))) {
content... | 1 |
[CLS] public void run() {
if (_plot == null) {
_plot = newPlot();
}
getContentPane().add(plot(), BorderLayout.NORTH);
int width;
int height;
String widthspec = getParameter("width");
if (w... | 0 |
[CLS] @Override
public void execute(String[] args) throws Exception {
Options cmdLineOptions = getCommandOptions();
try {
GnuParser parser = new GnuParser();
CommandLine commandLine = parser.parse(cmdLineOptions, TolvenPlugin.getInitArgs());
String srcRepositoryUR... | 1 |
[CLS] public static void transfer(FileInputStream fileInStream, FileOutputStream fileOutStream) throws IOException {
FileChannel fileInChannel = fileInStream.getChannel();
FileChannel fileOutChannel = fileOutStream.getChannel();
long fileInSize = fileInChannel.size();
try {
l... | 1 |
[CLS] public static boolean copyFile(final File fileFrom, final File fileTo) {
assert fileFrom != null : "fileFrom is null";
assert fileTo != null : "fileTo is null";
LOGGER.info(buildLogString(COPY_FILE_INFO, new Object[] { fileFrom, fileTo }));
boolean error = true;
FileInputSt... | 1 |
[CLS] public void convert(File src, File dest) throws IOException {
InputStream in = new BufferedInputStream(new FileInputStream(src));
DcmParser p = pfact.newDcmParser(in);
Dataset ds = fact.newDataset();
p.setDcmHandler(ds.getDcmHandler());
try {
FileFormat format =... | 1 |
[CLS] @Test
public void testCopyOverSize() throws IOException {
final InputStream in = new ByteArrayInputStream(TEST_DATA);
final ByteArrayOutputStream out = new ByteArrayOutputStream(TEST_DATA.length);
final int cpySize = ExtraIOUtils.copy(in, out, TEST_DATA.length + Long.SIZE);
ass... | 1 |
[CLS] private void copy(File from, File to) {
if (from.isDirectory()) {
File[] files = from.listFiles();
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory()) {
File newTo = new File(to.getPath() + File.separator + files[i].getName());
... | 1 |
[CLS] private static String getDocumentAt(String urlString) {
StringBuffer html_text = new StringBuffer();
try {
URL url = new URL(urlString);
URLConnection conn = url.openConnection();
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStre... | 0 |
[CLS] public static String md5(String value) throws NoSuchAlgorithmException {
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
try {
messageDigest.update(value.getBytes("UTF-8"));
} catch (UnsupportedEncodingException e) {
messageDigest.update(value.getByt... | 1 |
[CLS] public static void main(String[] args) {
String inFile = "test_data/blobs.png";
String outFile = "ReadWriteTest.png";
itkImageFileReaderUC2_Pointer reader = itkImageFileReaderUC2.itkImageFileReaderUC2_New();
itkImageFileWriterUC2_Pointer writer = itkImageFileWriterUC2.itkImageFileW... | 0 |
[CLS] public void delete(int id) throws FidoDatabaseException {
try {
Connection conn = null;
Statement stmt = null;
try {
conn = fido.util.FidoDataSource.getConnection();
conn.setAutoCommit(false);
stmt = conn.createStatement()... | 1 |
[CLS] protected void convertInternal(InputStream inputStream, DocumentFormat inputFormat, OutputStream outputStream, DocumentFormat outputFormat) {
File inputFile = null;
File outputFile = null;
try {
inputFile = File.createTempFile("document", "." + inputFormat.getFileExtension());
... | 1 |
[CLS] public static void copy(File file, File dir, boolean overwrite) throws IOException {
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
File out = new File(dir, file.getName());
if (out.exists() && !overwrite) {
throw new IOException("File: " + out + ... | 1 |
[CLS] private static void copy(File source, File dest) throws FileNotFoundException, IOException {
FileInputStream input = new FileInputStream(source);
FileOutputStream output = new FileOutputStream(dest);
System.out.println("Copying " + source + " to " + dest);
IOUtils.copy(input, outpu... | 1 |
[CLS] public long copyFile(String baseDirStr, String fileName, String file2FullPath) throws Exception {
long plussQuotaSize = 0;
if (!baseDirStr.endsWith(sep)) {
baseDirStr += sep;
}
BufferedInputStream in = null;
BufferedOutputStream out = null;
byte dataBuff... | 0 |
[CLS] public LocalizationSolver(String name, String serverIP, int portNum, String workDir) {
this.info = new HashMap<String, Object>();
this.workDir = workDir;
try {
Socket solverSocket = new Socket(serverIP, portNum);
this.fromServer = new Scanner(solverSocket.getInputSt... | 0 |
[CLS] private static void readAndWriteFile(File source, File target) {
try {
FileInputStream in = new FileInputStream(source);
FileOutputStream out = new FileOutputStream(target);
int c;
while ((c = in.read()) != -1) out.write(c);
in.close();
... | 1 |
[CLS] public void testSystemPropertyConnector() throws Exception {
final String rootFolderPath = "test/ConnectorTest/fs/".toLowerCase();
final Connector connector = new SystemPropertyConnector();
final ContentResolver contentResolver = new UnionContentResolver();
final FSContentResolver ... | 1 |
[CLS] private void copyThemeProviderClass() throws Exception {
InputStream is = getClass().getResourceAsStream("/zkthemer/ThemeProvider.class");
if (is == null) throw new RuntimeException("Cannot find ThemeProvider.class");
File outFile = new File(theme.getJarRootFile(), "zkthemer/ThemeProvider.... | 0 |
[CLS] public void sendContent(OutputStream out, Range range, Map<String, String> params, String contentType) throws IOException {
LOGGER.debug("DOWNLOAD - Send content: " + realFile.getAbsolutePath());
LOGGER.debug("Output stream: " + out.toString());
if (ServerConfiguration.isDynamicSEL()) {
... | 1 |
[CLS] public static void copy(File source, File dest) throws FileNotFoundException, IOException {
FileInputStream input = new FileInputStream(source);
FileOutputStream output = new FileOutputStream(dest);
System.out.println("Copying " + source + " to " + dest);
IOUtils.copy(input, output... | 1 |
[CLS] public static void doVersionCheck(View view) {
view.showWaitCursor();
try {
URL url = new URL(jEdit.getProperty("version-check.url"));
InputStream in = url.openStream();
BufferedReader bin = new BufferedReader(new InputStreamReader(in));
String line;... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.