Skip to content

Instantly share code, notes, and snippets.

🗿
yes the whole earth

Alberto Ramos Shujito

🗿
yes the whole earth
Block or report user

Report or block Shujito

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ExcludeFieldsWithoutSerializedName.java
/**
* Estrategia de exclusion para {@link Gson} para saltarse campos que no sean serializables
* @author shujito
*/
public class ExcludeFieldsWithoutSerializedName implements ExclusionStrategy
{
@Override
public boolean shouldSkipClass(Class<?> clss)
{
return false;
@Shujito
Shujito / http.java
Last active Aug 29, 2015
ejemplo HttpURLConnection, le faltan try catches
View http.java
// nueva conexion
URL url = new URL("http://danbooru.donmai.us/posts.json?tags=setz");
// abrir
HttpURLConnection https = (HttpURLConnection) url.openConnection();
// conectar
https.connect();
// 200,401,404,500
int code = https.getResponseCode();
// OK, Access denied, Not found, Internal server error
String message = https.getResponseMessage();
You can’t perform that action at this time.