Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

CORE API / CATATAN</>
Core API07 Des 2008

How do I create temporary file?

A temporary file can be created by using java.io.File.createTempFile() method. It accepts the prefix, suffix and the path where the file will be stored. When no path is specified it will use the platform default temporary folder. The name of the temporary file will be in the form of prefix plus five or more random […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API05 Des 2008

How do I add hours, minutes or seconds to a date?

This example shows you how to add or subtract hours, minutes or seconds to a date using the java.util.Calendar object. package org.kodejava.util; import java.util.Calendar; public class DateAddSubtract { public static void main(String[] args) { // Gets a calendar using the default time zone and locale. The // Calendar returned is based on the current time […]

Wayan · 1 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons05 Des 2008

How do I add query string to HttpMethod object?

To send query string information in HTTP GET command you either using passing a simple string or an array of NameValuePair object into the HttpMethod‘s setQueryString() method. We also need to encode the parameter values before passing it to the method. package org.kodejava.commons.httpclient; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.util.URIUtil; import org.apache.commons.httpclient.methods.GetMethod; import java.io.IOException; public cla...

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons04 Des 2008

How do I set a proxy for HttpClient?

In this example you will see how to configure proxy when using the Apache Commons HttpClient library. package org.kodejava.commons.httpclient; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.HostConfiguration; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpMethod; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache....

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons30 Nov 2008

How do I perform HTTP GET method?

Below is an example using Commons HttpClient library to retrieve information from a website using HTTP GET method. The response will be returned as stream by the HttpMethod.getResponseBodyAsStream() method. If you want something simple you can get the response as string by using the HttpMethod.getResponseBodyAsString() method. package org.kodejava.commons.httpclient; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpMethod; import org.a...

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API26 Nov 2008

How do I format date using a locale based format?

The code below demonstrate how to format date information for a specific locale. In the example utilize the java.text.SimpleDateFormat class. package org.kodejava.text; import java.util.Locale; import java.util.Date; import java.text.SimpleDateFormat; public class FormatDateLocale { public static void main(String[] args) { // Defines an array of Locale we are going to use for // formatting date information. Locale[] […]

Wayan · 2 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.