Skip to content

Instantly share code, notes, and snippets.

View bblfish's full-sized avatar

Henry Story bblfish

View GitHub Profile
@bblfish
bblfish / WebFetcher
Created January 31, 2012 23:07
An test to start fetching content asynchronously using the aalto parser.
/*
* Copyright (c) 2012 Henry Story (bblfish.net)
* under the MIT licence defined at
* http://www.opensource.org/licenses/mit-license.html
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in the
* Software without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the
@bblfish
bblfish / AsyncJenaParser
Created January 31, 2012 22:23
Work on adapting on Jena's StAX2SAX to non blocking parser
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@bblfish
bblfish / WebFetcher
Created January 30, 2012 12:54
This shows how one should be able to use Jena readers (re issue JENA-203) https://issues.apache.org/jira/browse/JENA-203 but in fact this throws an exception ERROR (WebFetcher.scala:59) : org.xml.sax.SAXParseException; systemId: http://bblfish.net/people
/*
* Copyright (c) 2012 Henry Story (bblfish.net)
* under the MIT licence defined at
* http://www.opensource.org/licenses/mit-license.html
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in the
* Software without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the
@bblfish
bblfish / WebFetcher
Created January 29, 2012 22:44
Starting to play with writing a RDF client using the async-http-client https://github.com/ning/async-http-client
package org.w3c.readwriteweb.cache
import com.ning.http.client.AsyncHandler.STATE
import com.ning.http.client.AsyncHandler
import com.ning.http.client.AsyncHttpClient
import com.ning.http.client.HttpResponseBodyPart
import com.ning.http.client.HttpResponseHeaders
import com.ning.http.client.HttpResponseStatus
import com.ning.http.client.Response