Skip to content

Instantly share code, notes, and snippets.

2014-05-13 00:16:33
Full thread dump OpenJDK 64-Bit Server VM (20.0-b12 mixed mode):
"Attach Listener" daemon prio=10 tid=0x00007f82e8002000 nid=0x7e97 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"ActiveMQ Transport: tcp:///127.0.0.1:33181@61619" daemon prio=10 tid=0x00007f82e0e15000 nid=0x7e85 runnable [0x00007f82cd0cf000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:146)
@Test
public void should_update_expaned_comic_to_s3() throws Exception {
final String comicFile = "test.cbz";
final EncodingStatus comicStatus = comicStatusService.create(comicFile);
comicStatus.setStatus(Status.UPLOAD);
when(directoryListProcessor.process(any(ExecResult.class))).thenReturn(new ArrayList<String>() {{
add("mediaKey/0001.jpeg");
add("mediaKey/0002.jpeg");
}});
package com.alexandria.www.stripes;
import com.alexandria.www.bean.*;
import com.alexandria.www.enums.KindName;
import com.alexandria.www.enums.RatingSystemName;
import com.alexandria.www.service.*;
import com.alexandria.www.stripes.extensions.PatronActionBeanContext;
import org.junit.Test;
import java.util.ArrayList;
### Keybase proof
I hereby claim:
* I am lmeadors on github.
* I am larrymeadors (https://keybase.io/larrymeadors) on keybase.
* I have a public key whose fingerprint is 76C5 6671 F3CF A9AB 06BD 8B47 F21A 1C19 3A78 C833
To claim this, I am signing this object:
private void handleStartIntent(Intent intent) {
Log.d(TAG, "*** start intent");
final String outcome = intent.getStringExtra(SessionManager.START);
final Integer contentId = intent.getIntExtra(SessionManager.CONTENT_ID, -1);
final Integer patronId = intent.getIntExtra(SessionManager.PATRON_ID, -1);
final Integer seconds = intent.getIntExtra(SessionManager.SECONDS, 0);
final Integer milliseconds = seconds * 1000; // milliseconds needed for VideoView/MediaPlayer
Log.d(TAG, " - status: " + outcome);
protected Bitmap doInBackground(String... urls) {
final String imageUrl = urls[0];
Log.d(TAG, "looking for " + imageUrl);
try {
final String localUrl = imageCache.getLocalImage(imageUrl);
final InputStream inputStream = new URL(localUrl).openStream();
return BitmapFactory.decodeStream(inputStream);
if (KindName.isAudiobook(kindName) && mediaPlayer.getCurrentPosition() < 1) {
Log.d(TAG, "moving playback to position " + milliseconds + "(currentPosition = " + mediaPlayer.getCurrentPosition() + ")");
mediaPlayer.setVolume(0,0);
mediaPlayer.start();
mediaPlayer.pause();
while (mediaPlayer.getDuration() < 1) {
try {
Thread.sleep(1000);
if (KindName.isAudiobook(kindName) && mediaPlayer.getCurrentPosition() < 1) {
Log.d(TAG, "moving playback to position " + milliseconds + "(currentPosition = " + mediaPlayer.getCurrentPosition() + ")");
mediaPlayer.setVolume(0,0);
mediaPlayer.start();
mediaPlayer.pause();
while (mediaPlayer.getDuration() < 1) {
try {
Thread.sleep(1000);
if (KindName.isAudiobook(kindName) && mediaPlayer.getCurrentPosition() < 1) {
final Handler handler = new Handler();
handler.post(new Runnable() {
@Override
public void run() {
Log.d(TAG, "moving playback to position " + milliseconds + "(currentPosition = " + mediaPlayer.getCurrentPosition() + ")");
mediaPlayer.setVolume(0,0);
mediaPlayer.start();
@Override
protected Void doInBackground(Boolean... force) {
final boolean forceRefresh;
if (force != null && force.length > 0) {
forceRefresh = force[0];
} else {
forceRefresh = false;
}