This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.shin1ogawa.ffoauth; | |
import java.io.IOException; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import com.shin1ogawa.oauth.FFUtil; | |
public class FF { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static String byteArrayToBase64(byte[] bytes) { | |
int aLen = bytes.length; | |
int numFullGroups = aLen / 3; | |
int numBytesInPartialGroup = aLen - 3 * numFullGroups; | |
int resultLen = 4 * ((aLen + 2) / 3); | |
StringBuilder b = new StringBuilder(resultLen); | |
int inCursor = 0; | |
for (int i = 0; i < numFullGroups; i++) { | |
int byte0 = bytes[inCursor++] & 0xff; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.shin1ogawa.model; | |
import java.io.Serializable; | |
import java.util.Date; | |
import org.slim3.datastore.Attribute; | |
import org.slim3.datastore.Model; | |
import com.google.appengine.api.datastore.Key; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.shin1ogawa.controller; | |
import java.io.IOException; | |
import java.util.logging.Logger; | |
import org.slim3.controller.Controller; | |
import org.slim3.controller.Navigation; | |
import org.slim3.datastore.Datastore; | |
import org.slim3.util.StringUtil; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn archetype:generate \ | |
-DarchetypeGroupId=org.slim3 \ | |
-DarchetypeArtifactId=slim3-archetype-quickstart \ | |
-DarchetypeVersion=1.0.4 \ | |
-DarchetypeRepository=http://slim3.googlecode.com/svn/trunk/repository/ \ | |
-DgroupId=com.hogehoge \ | |
-DartifactId=hogehoge-slim3 \ | |
-Dversion=1.0-SNAPSHOT \ | |
-DinteractiveMode=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
<dependency> | |
<groupId>org.slim3</groupId> | |
<artifactId>slim3</artifactId> | |
<version>${slim3.version}</version> | |
<exclusions> | |
<exclusion> | |
<groupId>com.google.appengine</groupId> | |
<artifactId>appengine-api-1.0-sdk</artifactId> | |
</exclusion> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package buzz; | |
import java.util.Iterator; | |
import java.util.Map; | |
public class Main { | |
public static void main(String[] args) | |
throws java.security.InvalidKeyException, | |
java.security.NoSuchAlgorithmException, java.io.IOException { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.shin1ogawa; | |
import java.io.IOException; | |
import java.util.Set; | |
import java.util.logging.*; | |
import javax.servlet.http.*; | |
import com.google.appengine.api.users.*; | |
import com.google.appengine.repackaged.com.google.common.collect.Sets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javax.servlet.ServletContext log: Exception while dispatching incoming RPC call | |
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract bufferings.ktr.wjr.shared.model.WjrStore bufferings.ktr.wjr.client.service.KtrWjrService.loadStore(java.util.Map)' threw an unexpected exception: java.lang.SecurityException: Unable to get members for class chapter5.RemoteApiHelper | |
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:378) | |
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:581) | |
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188) | |
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224) | |
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) | |
at org.mortbay.jetty.servlet.Servle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import org.apache.commons.httpclient.HttpException; | |
import org.apache.commons.httpclient.URI; |