☕ AES.java (Java) 3.3 KB 2011-07-30
Java class for AES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
package buzzerproxy;
import java.net.*;
import java.io.*;
import org.bouncycastle.util.encoders.Hex;
import org.bouncycastle.crypto.BufferedBlockCipher;
import org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncycastle.crypto.engines.AESEngine;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.crypto.CryptoException;
*/
/*
public final class AES
{
public static final String decryptAES(String key, String message) throws Exception
{
// Get the KeyGenerator
KeyGenerator kgen = KeyGenerator.getInstance("AES");
kgen.init(128); // 192 and 256 bits may not be available
// Generate the secret key specs.
SecretKey skey = kgen.generateKey();
byte[] raw = skey.getEncoded();
SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
// Instantiate the cipher
Cipher cipher = Cipher.getInstance("AES");
////// cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
//////
////// byte[] encrypted =
////// cipher.doFinal((args.length == 0
////// ? "This is just an example" : args[0]).getBytes());
////// System.out.println("encrypted string: " + asHex(encrypted));
byte[] theByteArray = message.getBytes();
cipher.init(Cipher.DECRYPT_MODE, skeySpec);
byte[] original = cipher.doFinal(theByteArray);
... [truncated, 69 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "AES.java",
"description": "Java class for AES",
"dateModified": "2011-07-30",
"dateCreated": "2025-03-23",
"contentSize": "3.3 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/AES.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ BuzzerProxy.java (Java) 13.2 KB 2011-08-16
Java class for BuzzerProxy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* todo:
* - results so abholen, dass gleich die einzenlen dateien verlinkt werden können und aufs handy gepusht werden
* - in eine datei die aktuellen ergebnisse zwischenspeichern serilized, bei jedem start einlesen ( key=SESSIONID, VALUE=XMLRESULTSTRING )
* - polling beim server einbauen
* - im fehlerfall thread stoppen und neuen thread starten oder externe anwendung startet im fehlerfall neu
* - lockfile support, run only one instance
* http://download.oracle.com/javase/tutorial/essential/concurrency/simple.html
*/
package buzzerproxy;
import buzzerproxy.CommunicationProtocol;
import buzzerproxy.Crypto;
import buzzerproxy.Google;
import buzzerproxy.GoogleResultParser;
import buzzerproxy.Gzip;
import buzzerproxy.IO;
import buzzerproxy.Logging;
import buzzerproxy.XMLParser;
import buzzerproxy.bprot.ByteProtServer;
import buzzerproxy.handler.ExceptionHandler;
import buzzerproxy.handler.QuestionInterface;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
/**
*
* @author thecerial
*/
public class BuzzerProxy implements ExceptionHandler, QuestionInterface {
private ServerSocket serverSocket = null;
private Socket socket = null;
private final String secredCryptoKey = "7953e8d5dc9fed4b6d37569410fe2f85";
private int ServerPort = 3381;
private int backlogQueue = 10;
private int timeout = 7000; // 7 Sekunden darf jeder Request die Server Ressourcen verbraten
private String BuzzerProxyVersion = "1.1.a - 12.8.2011";
private String SECRET_AUTH_KEY = "2429545b007ffc86a98df6f3cab76fc4";
private String Version = "www.buzzerstar.com" + " / BuzzerProxyJar Version -" + BuzzerProxyVersion
+ " running on localhost on Port " + ServerPort;
private Socket client;
private ServerSocket server;
private String xmlContent = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>" + "<search>"
... [truncated, 255 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "BuzzerProxy.java",
"description": "Java class for BuzzerProxy",
"dateModified": "2011-08-16",
"dateCreated": "2025-03-23",
"contentSize": "13.2 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/BuzzerProxy.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ CacheDeleter.java (Java) 1.1 KB 2011-08-23
Java class for CacheDeleter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47 | package buzzerproxy;
import java.util.ArrayList;
import java.util.HashMap;
/**
* CacheDeleter - beinhaltet alle Funktione zum Cachen eines Suchbegriffs und
* seiner Results
*
* @author Sebastian Enger
* @see Serialization
* @since 1.1
* @version 1.1 / 2011-08-21
* @typ Class
*
*/
public class CacheDeleter extends Thread {
HashMap<String, ArrayList<ResultContainer>> cache = new HashMap<String, ArrayList<ResultContainer>>();
public CacheDeleter(HashMap<String, ArrayList<ResultContainer>> cache) {
this.cache = cache;
}
public synchronized void cleanCache() {
ArrayList<ResultContainer> value = new ArrayList<ResultContainer>();
long epoch = System.currentTimeMillis() / 1000;
int count = 0;
for (String key : cache.keySet()) {
value = cache.get(key);
ResultContainer it = value.get(count);
long storetime = it.getLastChecked();
if (storetime + Constant.CACHE_VALID_THROUGH > epoch) {
value.remove(count);
}
count++;
}
}
@Override
public void run() {
cleanCache();
}
} // static class CacheDeleter extends Thread {
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "CacheDeleter.java",
"description": "Java class for CacheDeleter",
"dateModified": "2011-08-23",
"dateCreated": "2025-03-23",
"contentSize": "1.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/CacheDeleter.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ CacheManager.java (Java) 6.8 KB 2011-11-20
Java class for CacheManager
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeSet;
/**
* CacheManager.java - beinhaltet alle Funktione zum Cachen eines Suchbegriffs
* und seiner Results
*
* @author Sebastian Enger
* @see Serialization
* @since 1.1
* @version 1.1 / 2011-08-21
* @typ Class
*
*/
public class CacheManager implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/** Cache */
private HashMap<String, ArrayList<ResultContainer>> cache;
/** Cache Deleter */
private CacheDeleter cacheDeleter;
/** Cache Writer/Reader*/
private Serialization ser;
/**
* Konstruktor
* @throws Exception
*/
public CacheManager() throws Exception {
cache = new HashMap<String, ArrayList<ResultContainer>>();
ser = new Serialization( Constant.CACHEFILE );
}
... [truncated, 150 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "CacheManager.java",
"description": "Java class for CacheManager",
"dateModified": "2011-11-20",
"dateCreated": "2025-03-23",
"contentSize": "6.8 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/CacheManager.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ CheckStatus.java (Java) 2.6 KB 2011-08-23
Java class for CheckStatus
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import org.apache.http.Header;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
/**
*
* @author Enger
*/
public class CheckStatus {
private String contentLenght = "";
public boolean isAlive(String urlToGet) throws ClientProtocolException, IOException {
boolean isAlive = false;
String urlGetMe = null;
setContentLenght("-1");
try {
URL url = new URL(urlToGet);
URI uri = new URI(url.getProtocol(), url.getHost(), url.getPath(), url.getQuery(), null);
// System.out.println("URI " + uri.toString() + " is OK");
urlGetMe = uri.toString();
} catch (MalformedURLException e) {
System.out.println("URL " + urlToGet + " is a malformed URL");
} catch (URISyntaxException e) {
System.out.println("URI " + urlToGet + " is a malformed URL");
}
HttpClient client = new DefaultHttpClient();
HttpGet method = new HttpGet(urlGetMe);
HttpResponse httpResponse = null;
try {
httpResponse = client.execute(method);
int statusCode = httpResponse.getStatusLine().getStatusCode();
... [truncated, 36 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "CheckStatus.java",
"description": "Java class for CheckStatus",
"dateModified": "2011-08-23",
"dateCreated": "2025-03-23",
"contentSize": "2.6 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/CheckStatus.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ CommunicationProtocol.java (Java) 2.1 KB 2011-08-15
Java class for CommunicationProtocol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Enger
*/
public class CommunicationProtocol {
CommunicationProtocol() {
}
public final String internalServerErrorXML() {
StringBuilder sb = new StringBuilder();
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>");
sb.append("<servicetyp>InternalServerError</servicetyp>");
sb.append("<content>");
sb.append("<item></item>");
sb.append("</content>");
sb.append("</xml>");
return sb.toString();
} // public final String internalServerErrorXML(){
public final String timeoutXML() {
StringBuilder sb = new StringBuilder();
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>");
sb.append("<servicetyp>Timeout</servicetyp>");
sb.append("<content>");
sb.append("<item></item>");
sb.append("</content>");
sb.append("</xml>");
return sb.toString();
} // public final String timeoutXML(){
public final String wrongProtocolXML() {
StringBuilder sb = new StringBuilder();
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>");
... [truncated, 25 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "CommunicationProtocol.java",
"description": "Java class for CommunicationProtocol",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "2.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/CommunicationProtocol.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Constant.java (Java) 2.0 KB 2011-09-15
Java class for Constant
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
/**
*
* @author Enger
*/
public class Constant {
public static final String CACHEFILE = "buzzerstar.cache.ser.db";
public static final int SERVER_PORT = 3381;
public static final String SERVER_HOST = "46.38.232.54";
public static final int HTTP_TIMEOUT = 5000; // in ms
public static final long CACHE_VALID_THROUGH = 60 * 60 * 24 * 7; // 7 Tage
// Cache
public static final String HTTP_USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0";
public static final String HTTP_REFERER = "http://www.google.de/search?q=really+cool+site&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:de:official&client=firefox-a&hl=en&gl=US";
public static final String XML_PATH = "/srv/server/resources/xml/Users.xml"; // linux:
// /server/protocol/Users.xml
public static final String XML_VERSION = "xmlversion";
public static final String XML_CURRENT_VERSION = "1000";
public static final String SECRET_AUTH_KEY = "2429545b007ffc86a98df6f3cab76fc4";
public static final String LOCKFILE = "buzzerstar.lock";
// Update File, das ausgeliefert werden soll
public static final String UPDATE_ANDROID = "/srv/server/update/BuzzerStar_V1_0_0.pkm";
// xml related
public static final String CLIENT_ID = "clientid";
public static final String CLIENT_VERSION = "clientversion";
public static final String SEARCH_SERVICE = "searchservice";
public static final String FILE_TYP = "filetyp";
public static final String RESULT_PAGE = "page";
public static final String SEARCH_QUERY = "searchquery";
public static final String TOP_SEARCH_KEYWORDS = "/srv/server/resources/top/top.txt";
// DB related
public static final String DB_HIBERNATE_CONFIGURATION_XML = "/srv/server/resources/xml/hibernate.cfg.xml";
public static final String DB_ALTERNATIVE_LOG_FILE = "buzzerstar.query.log.txt";
public static final String DB_CRYPTO_KEY = "rouTer!9923@On1ine!3381=";
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Constant.java",
"description": "Java class for Constant",
"dateModified": "2011-09-15",
"dateCreated": "2025-03-23",
"contentSize": "2.0 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/Constant.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Crypto.java (Java) 3.4 KB 2011-08-15
Java class for Crypto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
//import java.math.BigInteger;
import java.security.SecureRandom;
//import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bouncycastle.util.encoders.Hex;
import org.bouncycastle.crypto.BufferedBlockCipher;
import org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncycastle.crypto.engines.AESEngine;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.crypto.CryptoException;
/**
*
* @author Enger
*/
public class Crypto {
private byte[] cipherText = null;
public SecureRandom random = new SecureRandom();
private int len = 256;
private long sessionIDLenght = 32;
public final long generateSessionID() {
// return UUID.randomUUID().toString()+new BigInteger(130, random).toString(len);
// return new BigInteger(130, random).longValue();
SecureRandom randomr = new SecureRandom();
return randomr.nextLong();
} // public final String generateSessionID(){
public final String performEncrypt(byte[] key, String plainText) {
if (plainText == null || !(plainText instanceof String) || key == null || !(key instanceof byte[])) {
Exception e = new Exception();
Logger.getLogger(Crypto.class.getName()).log(Level.SEVERE, null, e);
System.exit(1);
} // if ( str == null || !(str instanceof String)){
byte[] ptBytes = plainText.getBytes();
BufferedBlockCipher cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(new AESEngine()));
... [truncated, 40 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Crypto.java",
"description": "Java class for Crypto",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "3.4 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/Crypto.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Filetype.java (Java) 4.8 KB 2011-08-24
Java class for Filetype
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import buzzerproxy.Mediatype;
/**
* @author Master
*/
public enum Filetype implements Serializable {
//*********
// Musik
//*********
MP3(Mediatype.MUSIK, "mp3"),
FLAC(Mediatype.MUSIK, "flac"), WMA(Mediatype.MUSIK, "wma"),
MIDI(Mediatype.MUSIK, "midi"), MP2(Mediatype.MUSIK, "mp2"),
WAV(Mediatype.MUSIK, "wav"), AAC(Mediatype.MUSIK, "aac"),
SMAF(Mediatype.MUSIK, "smaf"), MLD(Mediatype.MUSIK, "mld"),
OGG(Mediatype.MUSIK, "ogg"), MMF(Mediatype.MUSIK, "mmf"),
AIFF(Mediatype.MUSIK, "aiff"), RMA(Mediatype.MUSIK, "rma"),
MPC(Mediatype.MUSIK, "mpc"), APE(Mediatype.MUSIK,"ape"), // musik
//*********
// Bilder
//*********
JPG(Mediatype.BILDER, "jpg"), JPEG(Mediatype.BILDER, "jpeg"),
PNG(Mediatype.BILDER, "png"), GIF(Mediatype.BILDER, "gif"),
BMP(Mediatype.BILDER, "bmp"), TIFF(Mediatype.BILDER, "tiff"),
SVG(Mediatype.BILDER, "svg"), JPA(Mediatype.BILDER, "jpa"),
TIF(Mediatype.BILDER, "tif"), THM(Mediatype.BILDER, "thm"), // bilder
//*********
// Video
//*********
PG3(Mediatype.VIDEO, "3gp"), MPG(Mediatype.VIDEO, "mpg"),
AVI(Mediatype.VIDEO, "avi"), WMV(Mediatype.VIDEO, "wmv"),
MP4(Mediatype.VIDEO, "mp4"), MPE(Mediatype.VIDEO, "mpe"),
RM(Mediatype.VIDEO, "rm"), MPEG(Mediatype.VIDEO, "mpeg"),
MOV(Mediatype.VIDEO,"mov"), WMM(Mediatype.VIDEO, "wmm"),
WMF(Mediatype.VIDEO, "wmf"), RAM(Mediatype.VIDEO, "ram"),
OGM(Mediatype.VIDEO, "ogm"), ASX(Mediatype.VIDEO, "asx"),
FLV(Mediatype.VIDEO, "flv"), FLA(Mediatype.VIDEO, "fla"),
SWF(Mediatype.VIDEO, "swf"), F4V(Mediatype.VIDEO, "f4v"),
DIV(Mediatype.VIDEO, "div"), DIVX(Mediatype.VIDEO, "divx"),
... [truncated, 107 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Filetype.java",
"description": "Java class for Filetype",
"dateModified": "2011-08-24",
"dateCreated": "2025-03-23",
"contentSize": "4.8 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/Filetype.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Google.java (Java) 1.5 KB 2011-08-16
Java class for Google
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.http.client.ClientProtocolException;
public class Google {
private String GOOGLE_SEARCH_BASE = "https://ajax.googleapis.com/ajax/services/search/web?v=1.0&" + "q=intitle:'index+of'%20+'last+modified'%20+'parent+directory'%20+description%20+size+FILETYP+SEARCHQUERY&key=AIzaSyAcvn-vGugDlvBilWabtpfGeC619KQxo_w";
public String getGoogleContent(String searchQuery, String fileType) {
if (searchQuery == null || !(searchQuery instanceof String) || fileType == null || !(fileType instanceof String)) {
Exception e = new Exception();
Logger.getLogger(Google.class.getName()).log(Level.SEVERE, null, e);
System.exit(1);
} // if ( str == null || !(str instanceof String)){
Http h = new Http();
String returnContent = "";
searchQuery = searchQuery.replace(" ", "%20");
fileType = fileType.replace(" ", "%20");
String searchUrl = GOOGLE_SEARCH_BASE.replace("SEARCHQUERY", searchQuery).replace("FILETYP", fileType);
try {
returnContent = h.get(searchUrl);
} catch (ClientProtocolException ex) {
Logger.getLogger(Google.class.getName()).log(Level.SEVERE, null, ex);
}
return returnContent;
} // public String getGoogleContent(String searchQuery, String fileType){
} // public class Google {
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Google.java",
"description": "Java class for Google",
"dateModified": "2011-08-16",
"dateCreated": "2025-03-23",
"contentSize": "1.5 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/Google.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ GoogleResultParser.java (Java) 3.7 KB 2011-08-16
Java class for GoogleResultParser
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import buzzerproxy.Http;
import java.util.ArrayList;
import org.apache.http.client.ClientProtocolException;
/**
*
* @author Enger
*/
public class GoogleResultParser {
public ArrayList<String> parseResults(String rawResults, String filetyp) {
if (rawResults == null || !(rawResults instanceof String)) {
Exception e = new Exception();
Logger.getLogger(GoogleResultParser.class.getName()).log(Level.SEVERE, null, e);
System.exit(1);
} // if ( str == null || !(str instanceof String)){
Http h = new Http();
StringBuilder sb = new StringBuilder();
String[] arr = rawResults.split("\"");
// sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>");
// sb.append("<content>");
// sb.append("<servicetyp>Results</servicetyp>");
try {
for (int i = 0; i < arr.length; i++) {
int pos = i + 2;
if (arr[i].equalsIgnoreCase("unescapedUrl")) {
String url = arr[pos];
boolean isAlive = false;
try {
isAlive = h.isAlive(url);
} catch (ClientProtocolException ex) {
Logger.getLogger(GoogleResultParser.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(GoogleResultParser.class.getName()).log(Level.SEVERE, null, ex);
}
System.out.println("URL: " + url + " Status: " + isAlive);
... [truncated, 50 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "GoogleResultParser.java",
"description": "Java class for GoogleResultParser",
"dateModified": "2011-08-16",
"dateCreated": "2025-03-23",
"contentSize": "3.7 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/GoogleResultParser.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Gzip.java (Java) 17.0 KB 2011-08-15
Java class for Gzip
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.*;
/**
* Quelle: http://download.oracle.com/javase/6/docs/api/java/util/zip/Inflater.html
* Quelle: http://www.coderanch.com/t/374637/java/java/Compressing-Decompressing-strings-Java
* @author IBB-Teilnehmer
*/
public final class Gzip {
public SecureRandom random = new SecureRandom();
public final int FileNameLenght = 512;
public final String gzip(String str) {
if ( str == null || !(str instanceof String)){
Exception e = new Exception();
Logger.getLogger(Gzip.class.getName()).log(Level.SEVERE, null, e);
System.exit(1);
} // if ( str == null || !(str instanceof String)){
Writer writer = null;
try {
String longFilename = new BigInteger(130, random).toString(FileNameLenght);
FileOutputStream output = null;
try {
output = new FileOutputStream(longFilename + ".gz");
... [truncated, 409 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Gzip.java",
"description": "Java class for Gzip",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "17.0 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/Gzip.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ HTTPTest.java (Java) 466 bytes 2011-08-25
Java class for HTTPTest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 | /**
*
*/
package buzzerproxy;
import java.util.ArrayList;
import buzzerproxy.Http;
/**
* @author Enger
*
*/
public class HTTPTest {
private static String startUrl = "http://bobgentile.com/Music/";
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Http h = new Http();
ArrayList<String> r = h.getRecursively(startUrl);
System.out.println("UrlArraySize: " + r.size());
}
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "HTTPTest.java",
"description": "Java class for HTTPTest",
"dateModified": "2011-08-25",
"dateCreated": "2025-03-23",
"contentSize": "466 bytes",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/HTTPTest.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Http.java (Java) 11.1 KB 2011-08-16
Java class for Http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
/**
*
* @author Enger
* @see: http://www.rgagnon.com/javadetails/java-0639.html
*/
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.List;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
/**
@see http://hc.apache.org/httpcomponents-client-ga/examples.html
*/
public class Http {
private ArrayList<String> validResultEntrys = new ArrayList<String>();
public Http() {
... [truncated, 269 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Http.java",
"description": "Java class for Http",
"dateModified": "2011-08-16",
"dateCreated": "2025-03-23",
"contentSize": "11.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/Http.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ IO.java (Java) 2.4 KB 2011-08-16
Java class for IO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
import java.io.DataOutputStream;
import java.util.HashMap;
/**
*
* @author Enger
*/
public class IO {
IO() {
}
public boolean isValidFileTyp(String uri, String filetyp){
boolean is = false;
filetyp = filetyp.replaceAll("\\(", "");
filetyp = filetyp.replaceAll("\\)", "");
String[] content = filetyp.split("|.");
for ( int i=0;i<content.length;i++){
if ( uri.endsWith(content[i])){
is = true;
} // if ( uri.endsWith(content[i])){
} // for ( int i=0;i<content.length;i++){
return is;
} // public boolean isValidFileTyp(String uri, String filetyp){
public boolean isSet(DataOutputStream str) {
boolean status = false;
try {
if (str == null || !(str instanceof DataOutputStream) || str.size() <= 0) {
status = false;
} else {
status = true;
} // if ( str == null || !(str instanceof String)){
} catch (NullPointerException e) {
status = false;
} catch (Exception e) {
status = false;
}
return status;
... [truncated, 40 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "IO.java",
"description": "Java class for IO",
"dateModified": "2011-08-16",
"dateCreated": "2025-03-23",
"contentSize": "2.4 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/IO.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Logging.java (Java) 1.4 KB 2011-08-15
Java class for Logging
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Enger
*/
public class Logging {
public final String SAVE_FILE = "/home/java/BuzzerProxyLogging.txt";
public void appendFile(String str) {
if (str == null || !(str instanceof String)){
Exception e = new Exception();
Logger.getLogger(Logging.class.getName()).log(Level.SEVERE, null, e);
System.exit(1);
} // if ( rawResults == null || !(rawResults instanceof String)){
FileWriter out = null;
try {
out = new FileWriter(SAVE_FILE, true);
} catch (IOException ex) {
Logger.getLogger(Logging.class.getName()).log(Level.SEVERE, null, ex);
}
BufferedWriter writer = new BufferedWriter(out);
try {
writer.write(str);
} catch (IOException ex) {
Logger.getLogger(Logging.class.getName()).log(Level.SEVERE, null, ex);
}
try {
writer.close();
} catch (IOException ex) {
Logger.getLogger(Logging.class.getName()).log(Level.SEVERE, null, ex);
}
} // public void appendFile(String str) {
... [truncated, 3 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Logging.java",
"description": "Java class for Logging",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "1.4 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/Logging.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Mediatype.java (Java) 455 bytes 2011-08-24
Java class for Mediatype
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Mediatype.java",
"description": "Java class for Mediatype",
"dateModified": "2011-08-24",
"dateCreated": "2025-03-23",
"contentSize": "455 bytes",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/Mediatype.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ ResultContainer.java (Java) 1.7 KB 2011-08-24
Java class for ResultContainer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy;
import java.io.Serializable;
/**
* @author M. Friedeboldt / Sebastian Enger
*/
public class ResultContainer implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private long lastChecked;
private String resultUrl = "";
private String sizeOfUrlContent = "";
private String fileTyp = "";
/**
* @return the lastChecked
*/
public long getLastChecked() {
return lastChecked;
}
/**
* @param lastChecked
* the lastChecked to set
*/
public void setLastChecked(long lastChecked) {
this.lastChecked = lastChecked;
}
/**
* @return the resultUrl
*/
public String getResultUrl() {
return resultUrl;
}
/**
* @param resultUrl
* the resultUrl to set
*/
public void setResultUrl(String resultUrl) {
this.resultUrl = resultUrl;
}
/**
... [truncated, 31 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "ResultContainer.java",
"description": "Java class for ResultContainer",
"dateModified": "2011-08-24",
"dateCreated": "2025-03-23",
"contentSize": "1.7 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/ResultContainer.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Serialization.java (Java) 2.8 KB 2011-08-24
Java class for Serialization
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.Semaphore;
public class Serialization {
private File cacheFile;
private Semaphore semaphore = new Semaphore(1);
/**
* @param filename
* @throws IOException
*/
public Serialization(String filename) throws IOException {
if (filename == null)
filename = "cache.ser.db";
cacheFile = new File(filename);
if (!cacheFile.exists()) {
cacheFile.createNewFile();
}
}
/**
* @param filename
* @param r
*/
public synchronized void writeCache(
HashMap<String, ArrayList<ResultContainer>> c) {
try {
// Block
semaphore.acquire();
try {
... [truncated, 66 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Serialization.java",
"description": "Java class for Serialization",
"dateModified": "2011-08-24",
"dateCreated": "2025-03-23",
"contentSize": "2.8 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/Serialization.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ TestClass.java (Java) 1.3 KB 2011-08-16
Java class for TestClass
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 | package buzzerproxy;
import buzzerproxy.CommunicationProtocol;
import buzzerproxy.Crypto;
import buzzerproxy.Google;
import buzzerproxy.GoogleResultParser;
import buzzerproxy.Gzip;
import buzzerproxy.IO;
import buzzerproxy.Logging;
import buzzerproxy.XMLParser;
import buzzerproxy.bprot.ByteProtServer;
import buzzerproxy.handler.ExceptionHandler;
import buzzerproxy.handler.QuestionInterface;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
/**
*
* @author Enger
*/
public class TestClass {
public static void main(String[] args) {
// TODO code application logic here
// BuzzerProxy proxy = new BuzzerProxy();
Google g = new Google();
GoogleResultParser gr = new GoogleResultParser();
String searchquery = "Madonna";
String filetyp = "(.mp3|.wav|.flac)";
String googleResultString = g.getGoogleContent(searchquery, filetyp);
System.out.println("googleResultString:" + googleResultString);
ArrayList<String> ResultXMLString = gr.parseResults(googleResultString, filetyp);
for (String uri : ResultXMLString) {
System.out.println(uri);
}
} // public static void main(String[] args) {
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "TestClass.java",
"description": "Java class for TestClass",
"dateModified": "2011-08-16",
"dateCreated": "2025-03-23",
"contentSize": "1.3 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/TestClass.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Timer.java (Java) 3.2 KB 2011-08-15
Java class for Timer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
import java.io.IOException;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* The Timer class allows a graceful exit when an application
* is stalled due to a networking timeout. Once the timer is
* set, it must be cleared via the reset() method, or the
* timeout() method is called.
* <p>
* The timeout length is customizable, by changing the 'length'
* property, or through the constructor. The length represents
* the length of the timer in milliseconds.
*
* @version 1.0
* @author David Reilly
* @see http://www.javacoffeebreak.com/articles/network_timeouts/
*/
public class Timer extends Thread {
/** Rate at which timer is checked */
protected int m_rate = 100;
/** Length of timeout */
private int m_length;
/** Time elapsed */
private int m_elapsed;
private Socket client;
public boolean isTimeout = false;
/**
* Creates a timer of a specified length
* @param length Length of time before timeout occurs
*/
public Timer(int length, Socket client) {
if (client == null || !(client instanceof Socket)) {
System.err.println("Client is null");
System.exit(1);
}
// Assign to member variable
m_length = length;
// Set time elapsed
... [truncated, 56 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Timer.java",
"description": "Java class for Timer",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "3.2 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/Timer.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ XMLParser.java (Java) 3.1 KB 2011-08-15
Java class for XMLParser
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package buzzerproxy;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Enger
*/
public class XMLParser {
public final String CLIENT_ID = "clientid";
public final String CLIENT_VERSION = "clientversion";
public final String SEARCH_SERVICE = "searchservice";
public final String FILE_TYP = "filetyp";
public final String RESULT_PAGE = "page";
public final String SEARCH_QUERY = "searchquery";
public final HashMap<String, String> parseResults(String rawResults) {
if ( rawResults == null || !(rawResults instanceof String)|| rawResults.isEmpty() ){
Exception e = new Exception();
Logger.getLogger(XMLParser.class.getName()).log(Level.SEVERE, null, e);
System.exit(1);
} // if ( rawResults == null || !(rawResults instanceof String)){
HashMap<String, String> results = new HashMap<String, String>();
String[] arr = rawResults.split("<");
String key = null;
String value = null;
for (int i = 0; i < arr.length; i++) {
//System.out.println("array"+i+" :"+arr[i]);
try {
String[] splitter = arr[i].split(">");
key = splitter[0];
value = splitter[1];
if ((key != null && !key.isEmpty()) && ( value != null && !value.isEmpty() ) ){
splitter[0].trim();
splitter[1].trim();
splitter[0] = splitter[0].replaceAll("\\s+", ""); // Achtung, hier wird der Whitespace entfernt
splitter[1] = splitter[1].replaceAll("\\s+", "");
results.put(key, value);
... [truncated, 32 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "XMLParser.java",
"description": "Java class for XMLParser",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "3.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/XMLParser.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
bprot/
(5 files) ☕ ByteProtComm.java (Java) 3.1 KB 2011-08-15
Java class for ByteProtComm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy.bprot;
import java.net.Socket;
import buzzerproxy.util.ByteProtUtil;
/**
* @author M. Friedeboldt
*/
public class ByteProtComm extends Thread {
private ByteProtUtil byteProtUtil;
private SessionManager sessionManager;
/**
* @param sock
*/
public ByteProtComm(Socket sock, SessionManager sessionManager) {
this.byteProtUtil = new ByteProtUtil( sock );
this.sessionManager = sessionManager;
}
@Override
public void run() {
try {
while ( !readKey() )
;
} catch ( Exception e ) {
e.printStackTrace();
}
}
/**
* lesen des Schlssels von Socket
* @return
*/
private boolean readKey() throws Exception {
byte key = byteProtUtil.getByte();
switch ( key ) {
/*
* Register / Session
*/
case (byte) 0xE1:
long sessionID = sessionManager.createNewSession();
byteProtUtil.sendSession( sessionID );
break;
/*
* Question
... [truncated, 67 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "ByteProtComm.java",
"description": "Java class for ByteProtComm",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "3.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/bprot/ByteProtComm.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ ByteProtResult.java (Java) 844 bytes 2011-08-15
Java class for ByteProtResult
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 | package buzzerproxy.bprot;
/**
* @author M. Friedeboldt
*/
public class ByteProtResult {
private int count;
private String[] results;
/**
* @param result
*/
public ByteProtResult(String result) {
// Parsen
// TODO
results = null;
count = 0;
}
/**
* Anzahl der Ergebnisse
* @return
*/
public int getCount() {
return count;
}
/**
* @param index
* @param max
* @return
*/
public String getResult(int index, int max) {
StringBuilder sb = new StringBuilder();
for ( int i = index; i < (i + max); i++ ) {
if ( results != null && results.length < i )
sb.append( results[i] );
}
return sb.toString();
}
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "ByteProtResult.java",
"description": "Java class for ByteProtResult",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "844 bytes",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/bprot/ByteProtResult.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ ByteProtServer.java (Java) 1.4 KB 2011-08-16
Java class for ByteProtServer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy.bprot;
import java.net.ServerSocket;
import java.net.Socket;
import buzzerproxy.handler.ExceptionHandler;
import buzzerproxy.handler.QuestionInterface;
/**
*
* @author M. Friedeboldt
*/
public class ByteProtServer extends Thread {
private int port;
private ExceptionHandler handler;
private SessionManager sessionManager;
private QuestionInterface questionInterface;
/**
*
* @param port
* @throws Exception
*/
public ByteProtServer(int port, QuestionInterface questionInterface, ExceptionHandler handler) {
this.port = port;
this.handler = handler;
this.questionInterface = questionInterface;
}
@Override
public void run() {
try {
// create Server
ServerSocket socket = new ServerSocket( port );
// Session Manager
sessionManager = new SessionManager( questionInterface );
// Wait...
while ( true ) {
System.out.println( "wait for ...." );
Socket sock = socket.accept();
System.out.println( "accept() ..." );
new ByteProtComm( sock, sessionManager ).start();
}
... [truncated, 6 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "ByteProtServer.java",
"description": "Java class for ByteProtServer",
"dateModified": "2011-08-16",
"dateCreated": "2025-03-23",
"contentSize": "1.4 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/bprot/ByteProtServer.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ Session.java (Java) 1.3 KB 2011-08-15
Java class for Session
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy.bprot;
import buzzerproxy.handler.QuestionInterface;
/**
* @author M. Friedeboldt
*/
public class Session implements Runnable {
private String question;
private QuestionInterface questionInterface;
private boolean ready;
private ByteProtResult protResult;
/**
* @param questionInterface
*/
public Session(QuestionInterface questionInterface) {
this.questionInterface = questionInterface;
this.ready = false;
}
/**
* @param question
*/
public void setQuestion(String question) {
this.question = question;
new Thread( this ).start();
}
/**
* @return
*/
public boolean isReady() {
return ready;
}
/**
* @return
*/
public String getResult(int index, int max) {
return protResult.getResult( index, max );
}
/**
* @return
*/
... [truncated, 15 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Session.java",
"description": "Java class for Session",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "1.3 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/bprot/Session.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ SessionManager.java (Java) 1.2 KB 2011-08-15
Java class for SessionManager
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy.bprot;
import java.util.HashMap;
import buzzerproxy.handler.QuestionInterface;
/**
* @author M. Friedeboldt
*/
public class SessionManager {
private HashMap<Long, Session> map;
private QuestionInterface questionInterface;
/**
* @param questionInterface
*/
public SessionManager(QuestionInterface questionInterface) {
map = new HashMap<Long, Session>();
this.questionInterface = questionInterface;
}
/**
* @return
*/
synchronized public long createNewSession() {
Long sessionId = System.currentTimeMillis();
while ( map.containsKey( sessionId ) )
sessionId = System.currentTimeMillis();
map.put( sessionId, new Session( questionInterface ) );
return sessionId;
}
/**
* @param sessionId
* @return
*/
synchronized public Session getSession(long sessionId) {
return map.get( new Long( sessionId ) );
}
/**
* @param sessionId
*/
synchronized public void removeSession(Long sessionId) {
map.remove( new Long( sessionId ) );
}
}
... [truncated, 1 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "SessionManager.java",
"description": "Java class for SessionManager",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "1.2 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/bprot/SessionManager.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
db/
(7 files) ☕ DatabaseManager.java (Java) 2.5 KB 2011-09-17
Java class for DatabaseManager
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy.db;
import org.hibernate.*;
import buzzerproxy.db.view.BaseEntry;
/**
* @author Enger
*
*/
public class DatabaseManager {
public Session ses = null;
public HibernateUtil util = null;
public SessionFactory sesFac = null;
// private Log Log = LogFactory.getLog(DatabaseManager.class);
/**
*
*/
public DatabaseManager() {
try {
this.sesFac = HibernateUtil.getSessionFactory();
this.ses = sesFac.openSession();
} catch ( Exception e ) {
e.printStackTrace();
}
this.util = new HibernateUtil();
}
/**
* @param baseEntry
*/
public void createTable(BaseEntry baseEntry) {
Transaction tx = null;
try {
tx = ses.beginTransaction();
ses.createQuery( baseEntry.createTable() );
tx.commit();
ses.close();
} catch ( HibernateException e ) {
e.printStackTrace();
if ( tx != null )
try {
tx.rollback();
} catch ( HibernateException e1 ) {
System.out.println( "rollback not successful" );
}
if ( ses != null )
... [truncated, 44 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "DatabaseManager.java",
"description": "Java class for DatabaseManager",
"dateModified": "2011-09-17",
"dateCreated": "2025-03-23",
"contentSize": "2.5 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/db/DatabaseManager.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ DerbyShowTableContent.java (Java) 3.1 KB 2011-09-17
Java class for DerbyShowTableContent
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy.db;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
/**
* @author Tom
*/
public class DerbyShowTableContent {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
Properties properties = new Properties();
// properties.put("user", "user1");
// properties.put("password", "user1");
Connection connection = DriverManager.getConnection(
"jdbc:derby:www.buzzerstar.com", properties);
// createTableTestIfItDoesntExistYet(connection);
// populateTableTestIfItHasNotBeenPopulatedYet(connection);
showContentsOfTableTest(connection);
connection.close();
}
/**
* @param connection
* @throws SQLException
*/
private static void showContentsOfTableTest(Connection connection)
throws SQLException {
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery("SELECT * FROM logging");
int columnCnt = resultSet.getMetaData().getColumnCount();
System.out.println("Colums: " + columnCnt);
int count = 0;
while (resultSet.next()) {
System.out.println("Count: " + count);
for (int i = 1; i <= columnCnt; i++) {
System.out.print("(" + i + ")" + resultSet.getString(i) + " ");
}
System.out.println();
... [truncated, 54 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "DerbyShowTableContent.java",
"description": "Java class for DerbyShowTableContent",
"dateModified": "2011-09-17",
"dateCreated": "2025-03-23",
"contentSize": "3.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/db/DerbyShowTableContent.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ HibernateProperty.java (Java) 1.8 KB 2011-09-17
Java class for HibernateProperty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 | package buzzerproxy.db;
import org.hibernate.cfg.Configuration;
import buzzerproxy.Constant;
import buzzerproxy.db.view.DatabaseEntry;
/**
*
* @author Enger
* @see http://docs.jboss.org/hibernate/core/3.6/reference/de-DE/html_single/; http://www.dil.univ-mrs.fr/~massat/docs/hibernate-2/api/net/sf/hibernate/cfg/Configuration.html
*/
public class HibernateProperty {
public Configuration createHibernateProperty() {
Configuration config = new Configuration();
config.addClass(DatabaseEntry.class);
config.setProperty("hibernate.dialect",
"org.hibernate.dialect.DerbyDialect");
config.setProperty("hibernate.connection.driver_class",
" org.gjt.mm.mysql.Driver");
config.setProperty("connection.driver_class",
"org.apache.derby.jdbc.ClientDriver");
config.setProperty("hibernate.cache.provider_class",
"org.hibernate.cache.EhCacheProvider");
config.setProperty(
"connection.url",
"jdbc:derby:www.buzzerstar.com;create=true;dataEncryption=true;bootPassword="
+ Constant.DB_CRYPTO_KEY
+ ";encryptionKeyLength=192;encryptionAlgorithm=AES/CBC/NoPadding;");
config.setProperty("connection.username", "app");
config.setProperty("connection.password", "app");
config.setProperty("connection.pool_size", "1");
// prop.put("hibernate.cache.region.factory_class",);
config.setProperty("hibernate.cache.use_second_level_cache", "true");
config.setProperty("hibernate.cache.use_query_cache", "true");
// config.setProperty("dialect", "org.hibernate.dialect.DerbyDialect");
config.setProperty("hibernate.cache.provider_class",
"org.hibernate.cache.HashtableCacheProvider");
// <mapping resource="DatabaseEntry.mapping.xml"/>
// <mapping class="buzzerstar.db.DatabaseEntry" />
return config;
}
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "HibernateProperty.java",
"description": "Java class for HibernateProperty",
"dateModified": "2011-09-17",
"dateCreated": "2025-03-23",
"contentSize": "1.8 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/db/HibernateProperty.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ HibernateTest.java (Java) 1.1 KB 2011-09-17
Java class for HibernateTest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47 | package buzzerproxy.db;
import java.io.File;
import buzzerproxy.db.view.*;
public class HibernateTest {
/**
* @param args
*/
public static void main(String[] args) {
File f = new File("www.buzzerstar.com");
DatabaseEntry dblog = new DatabaseEntry();
dblog.setclientversion("Alpha");
dblog.setfiletype(".avi");
dblog.setid("");
dblog.setip("1.1.1.1");
dblog.setresultcount("23");
dblog.setsearch("Paris Hilton ASS");
dblog.settype("free");
dblog.setdatetime("");
DatabaseEntry dblog2 = new DatabaseEntry();
dblog2.setclientversion("Release");
dblog2.setfiletype(".mov");
dblog2.setid("");
dblog2.setip("1.1.1.1");
dblog2.setresultcount("23");
dblog2.setsearch("Superstorm");
dblog2.settype("payment");
dblog2.setdatetime("");
System.out.println("FileTyp: "+ dblog2.getfiletype());
DatabaseManager databaseManager = new DatabaseManager();
if (!databaseManager.query(dblog))
System.out.println("DB Query failed");
DatabaseManager databaseManager2 = new DatabaseManager();
if (!databaseManager2.query(dblog2))
System.out.println("DB Query failed");
}
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "HibernateTest.java",
"description": "Java class for HibernateTest",
"dateModified": "2011-09-17",
"dateCreated": "2025-03-23",
"contentSize": "1.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/db/HibernateTest.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ HibernateUtil.java (Java) 809 bytes 2011-09-17
Java class for HibernateUtil
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 | package buzzerproxy.db;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
public class HibernateUtil {
private static final SessionFactory sessionFactory = buildSessionFactory();
private static SessionFactory buildSessionFactory() {
try {
// Create the SessionFactory from hibernate.cfg.xml
return new Configuration().configure().buildSessionFactory();
}
catch (Throwable ex) {
// Make sure you log the exception, as it might be swallowed
System.err.println("Initial SessionFactory creation failed." + ex);
throw new ExceptionInInitializerError(ex);
}
}
public static SessionFactory getSessionFactory() {
return sessionFactory;
}
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "HibernateUtil.java",
"description": "Java class for HibernateUtil",
"dateModified": "2011-09-17",
"dateCreated": "2025-03-23",
"contentSize": "809 bytes",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/db/HibernateUtil.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
view/
(2 files) ☕ BaseEntry.java (Java) 654 bytes 2011-09-17
Java class for BaseEntry
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 | package buzzerproxy.db.view;
import java.io.Serializable;
import java.util.UUID;
//import org.hibernate.Query;
//import org.hibernate.ejb.EntityManagerImpl;
/**
* @author Master
*/
public abstract class BaseEntry implements Serializable {
/** */
private static final long serialVersionUID = 1L;
private String id;
/**
*
*/
public void setID() {
this.id = UUID.randomUUID().toString();
}
/**
* @return
*/
public String getID() {
return this.id;
}
/**
* @return
*/
public abstract String createTable();
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "BaseEntry.java",
"description": "Java class for BaseEntry",
"dateModified": "2011-09-17",
"dateCreated": "2025-03-23",
"contentSize": "654 bytes",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/db/view/BaseEntry.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ DatabaseEntry.java (Java) 2.6 KB 2011-09-17
Java class for DatabaseEntry
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy.db.view;
/**
* @author Master
*
*/
public class DatabaseEntry extends BaseEntry {
/**
*
*/
private static final long serialVersionUID = 1L;
private String search;
private String datetime;
private String filetype;
private String ip;
private String type;
private String resultcount;
private String clientversion;
private String id;
public void setid(String id){
this.id = id;
}
public String getid(){
return this.id;
}
public String getclientversion() {
return this.clientversion;
}
public void setclientversion(String s) {
this.clientversion = s;
}
public void setresultcount(String s) {
this.resultcount = s;
}
public String getresultcount() {
return this.resultcount;
}
public void settype(String s) {
this.type = s;
}
public String gettype() {
return this.type;
... [truncated, 64 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "DatabaseEntry.java",
"description": "Java class for DatabaseEntry",
"dateModified": "2011-09-17",
"dateCreated": "2025-03-23",
"contentSize": "2.6 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/db/view/DatabaseEntry.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
handler/
(2 files) ☕ ExceptionHandler.java (Java) 128 bytes 2011-08-15
Java class for ExceptionHandler
| package buzzerproxy.handler;
public interface ExceptionHandler {
public void throwException(Throwable throwable);
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "ExceptionHandler.java",
"description": "Java class for ExceptionHandler",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "128 bytes",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/handler/ExceptionHandler.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
☕ QuestionInterface.java (Java) 262 bytes 2011-08-15
Java class for QuestionInterface
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | package buzzerproxy.handler;
/**
* @author M. Friedeboldt
*/
public interface QuestionInterface {
/**
* @param xmlRequest
* @return
* @throws Exception
*/
public String request(String xmlRequest) throws Exception;
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "QuestionInterface.java",
"description": "Java class for QuestionInterface",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "262 bytes",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/handler/QuestionInterface.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}
util/
(1 files) ☕ ByteProtUtil.java (Java) 3.9 KB 2011-08-15
Java class for ByteProtUtil
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | package buzzerproxy.util;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.SocketTimeoutException;
public class ByteProtUtil {
private Socket sock;
/**
*
*/
public ByteProtUtil(Socket sock) {
this.sock = sock;
}
/**
*
* @return
*/
public String readData(int anz) {
String res = "";
if ( sock != null && sock.isConnected() ) {
try {
InputStream g = sock.getInputStream();
// lnge des Strings
if ( anz > 0 ) {
byte[] in = new byte[anz];
g.read( in );
res = new String( in, "ISO-8859-1" );
}
return res;
} catch ( Exception e ) {
e.printStackTrace();
return null;
}
}
return null;
}
/**
* Senden
* @param data
*/
public void sendData(String data) {
if ( sock != null && sock.isConnected() ) {
try {
... [truncated, 108 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "ByteProtUtil.java",
"description": "Java class for ByteProtUtil",
"dateModified": "2011-08-15",
"dateCreated": "2025-03-23",
"contentSize": "3.9 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/util/ByteProtUtil.java",
"encodingFormat": "text/x-java",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Java"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/moviestar/BuzzerProxy/src/buzzerproxy/"
}