text string | label int64 |
|---|---|
[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] protected void copyFile(final File in, final File out) throws IOException {
final FileChannel inChannel = new FileInputStream(in).getChannel();
final FileChannel outChannel = new FileOutputStream(out).getChannel();
try {
inChannel.transferTo(0, inChannel.size(), outChannel);
... | 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] public static void copyFile(File file, String destDir) throws IOException {
if (!isCanReadFile(file)) throw new RuntimeException("The File can't read:" + file.getPath());
if (!isCanWriteDirectory(destDir)) throw new RuntimeException("The Directory can't write:" + destDir);
FileChannel srcC... | 1 |
[CLS] public File addFile(File file, String suffix) throws IOException {
if (file.exists() && file.isFile()) {
File nf = File.createTempFile(prefix, "." + suffix, workdir);
nf.delete();
if (!file.renameTo(nf)) {
IOUtils.copy(file, nf);
}
... | 0 |
[CLS] public static void copyFile(File source, File dest) throws Exception {
log.warn("File names are " + source.toString() + " and " + dest.toString());
if (!dest.getParentFile().exists()) dest.getParentFile().mkdir();
FileChannel sourceChannel = new FileInputStream(source).getChannel();
... | 1 |
[CLS] public static String doGetWithBasicAuthentication(URL url, String username, String password, int timeout) throws Throwable {
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");
con.setDoInput(true);
byte[] encodedPassword = (username + ":"... | 0 |
[CLS] public static void BubbleSortLong2(long[] num) {
int last_exchange;
int right_border = num.length - 1;
do {
last_exchange = 0;
for (int j = 0; j < num.length - 1; j++) {
if (num[j] > num[j + 1])
{
long temp = num[j];
num[j] = num[j + 1];
num[j + 1] = temp;
last_exchange = j... | 0 |
[CLS] public synchronized void checkout() throws SQLException, InterruptedException {
Connection con = this.session.open();
con.setAutoCommit(false);
String sql_stmt = DB2SQLStatements.shopping_cart_getAll(this.customer_id);
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSE... | 0 |
[CLS] public static String digestString(String data, String algorithm) {
String result = null;
if (data != null) {
try {
MessageDigest _md = MessageDigest.getInstance(algorithm);
_md.update(data.getBytes());
byte[] _digest = _md.digest();
... | 0 |
[CLS] public void testManageSources() throws Exception {
this.getTestTool().manageSources(this.getTestSourcesDirectory());
this.getTestTool().manageSources(this.getTestTool().getModules().getModule("Module"), this.getTestSourcesDirectory());
final File implementationDirectory = this.getTestSourc... | 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] private void channelCopy(File source, File dest) throws IOException {
FileChannel srcChannel = new FileInputStream(source).getChannel();
FileChannel dstChannel = new FileOutputStream(dest).getChannel();
try {
dstChannel.transferFrom(srcChannel, 0, srcChannel.size());
} ... | 0 |
[CLS] public void copyJarContent(File jarPath, File targetDir) throws IOException {
log.info("Copying natives from " + jarPath.getName());
JarFile jar = new JarFile(jarPath);
Enumeration<JarEntry> entries = jar.entries();
while (entries.hasMoreElements()) {
JarEntry file = en... | 1 |
[CLS] public void transport(File file) throws TransportException {
FTPClient client = new FTPClient();
try {
client.connect(getOption("host"));
client.login(getOption("username"), getOption("password"));
client.changeWorkingDirectory(getOption("remotePath"));
... | 0 |
[CLS] public void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException {
String name = metadata.get(Metadata.RESOURCE_NAME_KEY);
if (name != null && wanted.containsKey(name)) {
FileOutputStream out = new Fi... | 1 |
[CLS] private static void copier(FichierElectronique source, FichierElectronique cible) throws IOException {
cible.setNom(source.getNom());
cible.setTaille(source.getTaille());
cible.setTypeMime(source.getTypeMime());
cible.setSoumetteur(source.getSoumetteur());
cible.setDateDern... | 0 |
[CLS] private static void getPatronInfo(HttpClient client) throws Exception {
HttpGet httpget = new HttpGet("http://libsys.arlingtonva.us/patroninfo~S1/1079675/items");
HttpResponse response = client.execute(httpget);
HttpEntity entity = response.getEntity();
if (entity != null) {
... | 0 |
[CLS] private void getRandomGuid(boolean secure) {
MessageDigest md5 = null;
StringBuffer sbValueBeforeMD5 = new StringBuffer();
try {
md5 = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
System.out.println("Error: " + e);
}
... | 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 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] public static void BubbleSortDouble1(double[] num) {
boolean flag = true; // set flag to true to begin first pass
double temp; // holding variable
while (flag) {
flag = false; // set flag to false awaiting a possible swap
for (int j = 0; j < num.length - 1; j++) {
if (num[j] > num[j + 1]) // chan... | 0 |
[CLS] final void saveProject(Project project, final File file) {
if (projectsList.contains(project)) {
if (project.isDirty() || !file.getParentFile().equals(workspaceDirectory)) {
try {
if (!file.exists()) {
if (!file.createNewFile()) throw... | 0 |
[CLS] public void uploadFile(ActionEvent event) throws IOException {
InputFile inputFile = (InputFile) event.getSource();
synchronized (inputFile) {
ServletContext context = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
String fileNewPath =... | 0 |
[CLS] void setURLString(String path, boolean forceLoad) {
if (path != null) {
if (this.url != null || inputStream != null) throw new IllegalArgumentException(Ding3dI18N.getString("MediaContainer5"));
try {
URL url = new URL(path);
InputStream stream;
... | 0 |
[CLS] public String getHashedPhoneId(Context aContext) {
if (hashedPhoneId == null) {
final String androidId = BuildInfo.getAndroidID(aContext);
if (androidId == null) {
hashedPhoneId = "EMULATOR";
} else {
try {
final Messa... | 0 |
[CLS] public void initialize(IProgressMonitor monitor) throws JETException {
IProgressMonitor progressMonitor = monitor;
progressMonitor.beginTask("", 10);
progressMonitor.subTask(CodeGenPlugin.getPlugin().getString("_UI_GeneratingJETEmitterFor_message", new Object[] { getTemplateURI() }));
... | 0 |
[CLS] public FileReader(String filePath, Configuration aConfiguration) throws IOException {
file = new File(URLDecoder.decode(filePath, "UTF-8")).getCanonicalFile();
readerConf = aConfiguration;
if (file.isDirectory()) {
File indexFile = new File(file, "index.php");
File ... | 0 |
[CLS] public int procesar() {
int mas = 0;
String uriOntologia = "", source = "", uri = "";
String fichOrigenHTML = "", fichOrigenLN = "";
String ficheroOutOWL = "";
md5 firma = null;
StringTokenV2 entra = null, entra2 = null, entra3 = null;
FileInputStream lengNa... | 1 |
[CLS] private long generateNativeInstallExe(File nativeInstallFile, String instTemplate, File instClassFile) throws IOException {
InputStream reader = getClass().getResourceAsStream("/" + instTemplate);
ByteArrayOutputStream content = new ByteArrayOutputStream();
String installClassVarStr = "000... | 1 |
[CLS] public static String toPWD(String pwd) {
MessageDigest messageDigest = null;
try {
messageDigest = MessageDigest.getInstance("MD5");
messageDigest.reset();
messageDigest.update(pwd.getBytes("UTF-8"));
} catch (NoSuchAlgorithmException e) {
Sy... | 1 |
[CLS] public static void main(String[] args) {
if (args.length != 3) {
System.out.println("Usage: HexStrToBin enc/dec <infileName> <outfilename>");
System.exit(1);
}
try {
ByteArrayOutputStream os = new ByteArrayOutputStream();
InputStream in = new... | 1 |
[CLS] void openTextFile(String urlString, boolean install) {
StringBuffer sb = null;
try {
URL url = new URL(urlString);
InputStream in = url.openStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
sb = new StringBuffer();
... | 1 |
[CLS] private static String scramble(String text) {
try {
MessageDigest md = MessageDigest.getInstance("SHA-1");
md.update(text.getBytes("UTF-8"));
StringBuffer sb = new StringBuffer();
for (byte b : md.digest()) sb.append(Integer.toString(b & 0xFF, 16));
... | 0 |
[CLS] protected void loadConfigure() {
try {
confFile = System.getProperty("user.home");
confFile = confFile + W.sepa + ".elm" + W.sepa + "vesma.conf";
URL url = W.getResource(confFile);
InputStream is = url.openStream();
confDoc = W.loadDocumentFromIn... | 0 |
[CLS] public static String MD5(String s) {
try {
MessageDigest m = MessageDigest.getInstance("MD5");
m.update(s.getBytes(), 0, s.length());
return new BigInteger(1, m.digest()).toString(16);
} catch (NoSuchAlgorithmException ex) {
return "";
}
... | 1 |
[CLS] protected static String getFileContentAsString(URL url, String encoding) throws IOException {
InputStream input = null;
StringWriter sw = new StringWriter();
try {
System.out.println("Free mem :" + Runtime.getRuntime().freeMemory());
input = url.openStream();
... | 0 |
[CLS] @Override
protected Void doInBackground(String... urls) {
Log.d("ParseTask", "Getting URL " + urls[0]);
try {
XMLReader reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
reader.setContentHandler(mParser);
reader.parse(new InputSource(new... | 0 |
[CLS] public static String encrypt(String txt) throws Exception {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(txt.getBytes("UTF-8"));
byte raw[] = md.digest();
String hash = (new BASE64Encoder()).encode(raw);
return hash;
} [SEP] public static String md5(St... | 1 |
[CLS] public void includeCss(Group group, Writer out, PageContext pageContext) throws IOException {
ByteArrayOutputStream outtmp = new ByteArrayOutputStream();
if (AbstractGroupBuilder.getInstance().buildGroupJsIfNeeded(group, outtmp, pageContext.getServletContext())) {
FileOutputStream file... | 1 |
[CLS] private Concept fetchDataNeeded(String conceptUri) {
if (cache.size() > MAX_CACHE) cache.clear();
if (cache.containsKey(conceptUri)) return this.cache.get(conceptUri);
try {
URL url = new URL(conceptUri);
HttpURLConnection connection = (HttpURLConnection) url.openCo... | 0 |
[CLS] private String hashString(String key) {
MessageDigest digest;
try {
digest = java.security.MessageDigest.getInstance("MD5");
digest.update(key.getBytes());
byte[] hash = digest.digest();
BigInteger bi = new BigInteger(1, hash);
return Str... | 1 |
[CLS] @Test
public void testCopy_inputStreamToWriter_Encoding_nullEncoding() throws Exception {
InputStream in = new ByteArrayInputStream(inData);
in = new YellOnCloseInputStreamTest(in);
ByteArrayOutputStream baout = new ByteArrayOutputStream();
YellOnFlushAndCloseOutputStreamTest o... | 1 |
[CLS] private static String sendRPC(String xml) throws MalformedURLException, IOException {
String str = "";
String strona = OSdbServer;
String logowanie = xml;
URL url = new URL(strona);
URLConnection connection = url.openConnection();
connection.setRequestProperty("Conn... | 0 |
[CLS] public void runDynusT() {
final String[] exeFiles = new String[] { "DynusT.exe", "DLL_ramp.dll", "Ramp_Meter_Fixed_CDLL.dll", "Ramp_Meter_Feedback_CDLL.dll", "Ramp_Meter_Feedback_FDLL.dll", "libifcoremd.dll", "libmmd.dll", "Ramp_Meter_Fixed_FDLL.dll", "libiomp5md.dll" };
final String[] modelFiles ... | 1 |
[CLS] public boolean ponerRivalxRonda(int idJugadorDiv, int idRonda, int dato) {
int intResult = 0;
String sql = "UPDATE jugadorxdivxronda " + " SET idPareoRival = " + dato + " WHERE jugadorxDivision_idJugadorxDivision = " + idJugadorDiv + " AND ronda_numeroRonda = " + idRonda;
try {
... | 1 |
[CLS] protected static void clearTables() throws SQLException {
Connection conn = null;
Statement stmt = null;
try {
conn = FidoDataSource.getConnection();
conn.setAutoCommit(false);
stmt = conn.createStatement();
ClearData.clearTables(stmt);
... | 1 |
[CLS] private void writeAndCheckFile(DataFileReader reader, String base, String path, String hash, Reference ref, boolean hashall) throws Exception {
Data data = ref.data;
File file = new File(base + path);
file.getParentFile().mkdirs();
if (Debug.level > 1) System.err.println("read file... | 1 |
[CLS] public List<MytemHistory> getMytemHistories(String janCode) throws GaeException {
HttpClient client = new DefaultHttpClient();
HttpParams httpParams = client.getParams();
HttpConnectionParams.setSoTimeout(httpParams, 10000);
HttpProtocolParams.setVersion(httpParams, HttpVersion.HTT... | 0 |
[CLS] public String getTextData() {
if (tempFileWriter != null) {
try {
tempFileWriter.flush();
tempFileWriter.close();
FileReader in = new FileReader(tempFile);
StringWriter out = new StringWriter();
int len;
... | 1 |
[CLS] public boolean connentServer() {
boolean result = false;
try {
ftpClient = new FTPClient();
ftpClient.setDefaultPort(port);
ftpClient.setControlEncoding("GBK");
strOut = strOut + "Connecting to host " + host + "\r\n";
ftpClient.connect(ho... | 0 |
[CLS] private void copyOneFile(String oldPath, String newPath) {
File copiedFile = new File(newPath);
try {
FileInputStream source = new FileInputStream(oldPath);
FileOutputStream destination = new FileOutputStream(copiedFile);
FileChannel sourceFileChannel = source.g... | 1 |
[CLS] protected static String getURLandWriteToDisk(String url, Model retModel) throws MalformedURLException, IOException {
String path = null;
URL ontURL = new URL(url);
InputStream ins = ontURL.openStream();
InputStreamReader bufRead;
OutputStreamWriter bufWrite;
int off... | 1 |
[CLS] private String createDefaultRepoConf() throws IOException {
InputStream confIn = getClass().getResourceAsStream(REPO_CONF_PATH);
File tempConfFile = File.createTempFile("repository", "xml");
tempConfFile.deleteOnExit();
IOUtils.copy(confIn, new FileOutputStream(tempConfFile));
... | 1 |
[CLS] private 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 (IOEx... | 0 |
[CLS] private synchronized void configure() {
final Map res = new HashMap();
try {
final Enumeration resources = getConfigResources();
SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
while (resources.hasMoreElements()) {
final URL ... | 0 |
[CLS] public static String[] putFECSplitFile(String uri, File file, int htl, boolean mode) {
FcpFECUtils fecutils = null;
Vector segmentHeaders = null;
Vector segmentFileMaps = new Vector();
Vector checkFileMaps = new Vector();
Vector segmentKeyMaps = new Vector();
Vector... | 1 |
[CLS] @Test
public void testCopy_readerToOutputStream_nullOut() throws Exception {
InputStream in = new ByteArrayInputStream(inData);
in = new YellOnCloseInputStreamTest(in);
Reader reader = new InputStreamReader(in, "US-ASCII");
try {
IOUtils.copy(reader, (OutputStream) ... | 1 |
[CLS] public void initGet() throws Exception {
URL url = new URL(getURL());
con = (HttpURLConnection) url.openConnection();
con.setRequestProperty("Accept", "*/*");
con.setRequestProperty("Range", "bytes=" + getPosition() + "-" + getRangeEnd());
con.setUseCaches(false);
c... | 0 |
[CLS] public static boolean copyFile(File soureFile, File destFile) {
boolean copySuccess = false;
if (soureFile != null && destFile != null && soureFile.exists()) {
try {
new File(destFile.getParent()).mkdirs();
BufferedOutputStream out = new BufferedOutputSt... | 1 |
[CLS] public ScoreModel(URL url) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String line;
list = new ArrayList<ScoreModelItem>();
map = new HashMap<String, ScoreModelItem>();
line = in.readLine();
int n = 1;
... | 1 |
[CLS] public static byte[] encrypt(String x) throws NoSuchAlgorithmException {
MessageDigest d = null;
d = MessageDigest.getInstance("SHA-1");
d.reset();
d.update(x.getBytes());
return d.digest();
} [SEP] public static String hashMD5(String password) {
String hashword... | 1 |
[CLS] private String fetchCompareContent() throws IOException {
URL url = new URL(compareTo);
StringWriter sw = new StringWriter();
IOUtils.copy(url.openStream(), sw);
return sw.getBuffer().toString();
} [SEP] public static void main(String args[]) {
InputStream input = Syste... | 1 |
[CLS] private String sendImpl(String from, String destNumber, String text) throws IOException {
final QueryStringBuilder query = new QueryStringBuilder();
query.append("user", username);
query.append("password", password);
query.append("api_id", apiId);
query.append("to", destNum... | 0 |
[CLS] static void copy(String src, String dest) throws IOException {
File ifp = new File(src);
File ofp = new File(dest);
if (ifp.exists() == false) {
throw new IOException("file '" + src + "' does not exist");
}
FileInputStream fis = new FileInputStream(ifp);
... | 1 |
[CLS] boolean createSessionArchive(String archiveFilename) {
byte[] buffer = new byte[1024];
try {
ZipOutputStream archive = new ZipOutputStream(new FileOutputStream(archiveFilename));
for (mAnnotationsCursor.moveToFirst(); !mAnnotationsCursor.isAfterLast(); mAnnotationsCursor.mo... | 1 |
[CLS] public void run() {
Thread.currentThread().setName("zhongwen.com watcher");
String url = getURL();
try {
while (m_shouldBeRunning) {
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(new URL(url).openStream(), "ISO8859_1"... | 0 |
[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] private static void copyFile(String src, String dest) {
try {
File inputFile = new File(src);
File outputFile = new File(dest);
FileInputStream in = new FileInputStream(inputFile);
FileOutputStream out = new FileOutputStream(outputFile);
FileChan... | 1 |
[CLS] public long calculateResponseTime(Proxy proxy) {
try {
LOGGER.debug("Test network response time for " + RESPONSE_TEST_URL);
URL urlForTest = new URL(REACH_TEST_URL);
URLConnection testConnection = urlForTest.openConnection(proxy);
long startTime = System.cur... | 0 |
[CLS] public void createResource(String resourceUri, boolean publish, User user) throws IOException {
PermissionAPI perAPI = APILocator.getPermissionAPI();
Logger.debug(this.getClass(), "createResource");
resourceUri = stripMapping(resourceUri);
String hostName = getHostname(resourceUri)... | 1 |
[CLS] public static void downloadJars(IProject project, String repositoryUrl, String jarDirectory, String[] jars) {
try {
File tmpFile = null;
for (String jar : jars) {
try {
tmpFile = File.createTempFile("tmpPlugin_", ".zip");
URL ... | 1 |
[CLS] public static boolean copyfile(String file0, String file1) {
try {
File f0 = new File(file0);
File f1 = new File(file1);
FileInputStream in = new FileInputStream(f0);
FileOutputStream out = new FileOutputStream(f1);
int c;
while ((c =... | 1 |
[CLS] public boolean setSchedule(Schedule s) {
PreparedStatement pst1 = null;
PreparedStatement pst2 = null;
PreparedStatement pst3 = null;
ResultSet rs2 = null;
boolean retVal = true;
try {
conn = getConnection();
pst1 = conn.prepareStatement("INS... | 0 |
[CLS] public void test2() throws Exception {
SpreadsheetDocument document = new SpreadsheetDocument();
Sheet sheet = new Sheet("Planilha 1");
sheet.setLandscape(true);
Row row = new Row();
row.setHeight(20);
sheet.getMerges().add(new IntegerCellMerge(0, 0, 0, 5));
... | 0 |
[CLS] public static String crypt(String str) {
if (str == null || str.length() == 0) {
throw new IllegalArgumentException("String to encript cannot be null or zero length");
}
StringBuffer hexString = new StringBuffer();
try {
MessageDigest md = MessageDigest.getI... | 1 |
[CLS] private void loadMascotLibrary() {
if (isMascotLibraryLoaded) return;
try {
boolean isLinux = false;
boolean isAMD64 = false;
String mascotLibraryFile;
if (Configurator.getOSName().toLowerCase().contains("linux")) {
isLinux = true;
... | 1 |
[CLS] public static void main(String[] args) {
try {
String completePath = null;
String predictionFileName = null;
if (args.length == 2) {
completePath = args[0];
predictionFileName = args[1];
} else {
System.out.pri... | 1 |
[CLS] private void getRandomGUID(boolean secure) {
MessageDigest md5 = null;
StringBuffer sbValueBeforeMD5 = new StringBuffer(128);
try {
md5 = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
logger.error("Error: " + e);
}
... | 1 |
[CLS] public static String sha1(String src) {
MessageDigest md1 = null;
try {
md1 = MessageDigest.getInstance("SHA-1");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
try {
md1.update(src.getBytes("UTF-8"));
} catch (Unsu... | 0 |
[CLS] private void getRandomGUID(boolean secure) {
MessageDigest md5 = null;
StringBuffer sbValueBeforeMD5 = new StringBuffer();
try {
md5 = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
}
try {
long time = System.current... | 1 |
[CLS] private static void doCopyFile(File srcFile, File destFile, boolean preserveFileDate) throws IOException {
if (destFile.exists() && destFile.isDirectory()) {
throw new IOException("Destination '" + destFile + "' exists but is a directory");
}
FileInputStream input = new FileInp... | 0 |
[CLS] public void writeOutput(String directory) throws IOException {
File f = new File(directory);
int i = 0;
if (f.isDirectory()) {
for (AppInventorScreen screen : screens.values()) {
File screenFile = new File(getScreenFilePath(f.getAbsolutePath(), screen));
... | 1 |
[CLS] private HttpURLConnection getHttpURLConnection(String bizDocToExecute) {
StringBuffer servletURL = new StringBuffer();
servletURL.append(getBaseServletURL());
servletURL.append("?_BIZVIEW=").append(bizDocToExecute);
Map<String, Object> inputParms = getInputParams();
if (inp... | 0 |
[CLS] public XlsBook(String path) throws IOException {
boolean isHttp = path.startsWith("http://");
InputStream is = null;
if (isHttp) {
URL url = new URL(path);
is = url.openStream();
} else {
File file = new File(path);
is = new FileInput... | 0 |
[CLS] public void process() throws Exception {
String searchXML = FileUtils.readFileToString(new File(getSearchRequestRelativeFilePath()));
Map<String, String> parametersMap = new HashMap<String, String>();
parametersMap.put("searchXML", searchXML);
String proxyHost = null;
int p... | 1 |
[CLS] public GetMyDocuments() {
String urlString = dms_url + "/servlet/com.ufnasoft.dms.server.ServerGetMyDocuments";
String rvalue = "";
String filename = dms_home + FS + "temp" + FS + username + "mydocuments.xml";
try {
String urldata = urlString + "?username=" + URLEncoder... | 1 |
[CLS] public static void main(String[] args) throws IOException {
long readfilelen = 0;
BufferedRandomAccessFile brafReadFile, brafWriteFile;
brafReadFile = new BufferedRandomAccessFile("C:\\WINNT\\Fonts\\STKAITI.TTF");
readfilelen = brafReadFile.initfilelen;
brafWriteFile = new ... | 1 |
[CLS] public void processDeleteCompany(Company companyBean, AuthSession authSession) {
if (authSession == null) {
return;
}
DatabaseAdapter dbDyn = null;
PreparedStatement ps = null;
try {
dbDyn = DatabaseAdapter.getInstance();
if (companyBean.... | 0 |
[CLS] public void connect() throws IOException {
if (this.connection == null) {
this.connection = (HttpURLConnection) (new URL(url)).openConnection();
this.connection.setRequestMethod("POST");
this.connection.setUseCaches(false);
this.connection.setDoOutput(true);... | 0 |
[CLS] private long getLastModification() {
try {
if (connection == null) connection = url.openConnection();
return connection.getLastModified();
} catch (IOException e) {
LOG.warn("URL could not be opened: " + e.getMessage(), e);
return 0;
}
} ... | 0 |
[CLS] private static void unzipEntry(final ZipFile zipfile, final ZipEntry entry, final File outputDir) throws IOException {
if (entry.isDirectory()) {
createDir(new File(outputDir, entry.getName()));
return;
}
File outputFile = new File(outputDir, entry.getName());
... | 1 |
[CLS] private void checkSites() {
Log.d(LOG_TAG, "Updating sites: " + sitesToCheck.keySet().toString());
for (Map.Entry<Site, Item> entry : sitesToCheck.entrySet()) {
final Site site = entry.getKey();
final Item oldItem = entry.getValue();
try {
... | 0 |
[CLS] private void handleInterfaceUp(long eventID, long nodeID, String ipAddr, String eventTime) {
Category log = ThreadCategory.getInstance(OutageWriter.class);
if (eventID == -1 || nodeID == -1 || ipAddr == null) {
log.warn(EventConstants.INTERFACE_UP_EVENT_UEI + " ignored - info incomplet... | 0 |
[CLS] private void btnOkActionPerformed(java.awt.event.ActionEvent evt) {
try {
int id = 0;
String sql = "SELECT MAX(ID) as MAX_ID from CORE_USER_GROUPS";
PreparedStatement pStmt = Database.getMyConnection().prepareStatement(sql);
ResultSet rs = pStmt.executeQuery... | 0 |
[CLS] private HttpURLConnection getHttpURLConnection(String bizDocToExecute) {
StringBuffer servletURL = new StringBuffer();
servletURL.append(getBaseServletURL());
servletURL.append("?_BIZVIEW=").append(bizDocToExecute);
Map<String, Object> inputParms = getInputParams();
if (inp... | 0 |
[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 String[] getLine(String prefecture) {
HttpClient httpclient = null;
String[] lines = null;
try {
httpclient = new DefaultHttpClient();
List<NameValuePair> qparams = new ArrayList<NameValuePair>();
qparams.add(new BasicNameValuePair("method", "getL... | 0 |
[CLS] public HttpURLConnection getURLConnection() throws IOException {
String url_str = getServerURL();
URL url = new URL(url_str);
HttpURLConnection urlConnection;
if (url_str.toLowerCase().startsWith("https")) {
HttpsURLConnection urlSConnection = (HttpsURLConnection) url.o... | 0 |
[CLS] public String readLines() {
StringBuffer lines = new StringBuffer();
try {
int HttpResult;
URL url = new URL(address);
URLConnection urlconn = url.openConnection();
urlconn.connect();
HttpURLConnection httpconn = (HttpURLConnection) urlco... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.