Source
stringclasses
1 value
Date
int32
2.01k
2.01k
Text
stringlengths
3
15.9M
Token_count
int32
1
2.44M
github-java-corpus
2,012
package com.pugh.sockso.web; import com.pugh.sockso.Constants; import com.pugh.sockso.Properties; import com.pugh.sockso.db.Database; import com.pugh.sockso.resources.Locale; import com.pugh.sockso.resources.LocaleFactory; import com.pugh.sockso.resources.Resources; import com.pugh.sockso.web.action.Errorer; import c...
1,374
github-java-corpus
2,012
/** * Request.java * * Created on May 8, 2007, 12:38 PM * * Handles processing and access to the request information * */ package com.pugh.sockso.web; import java.io.InputStream; import java.io.IOException; import org.apache.log4j.Logger; public interface Request { public static final Logger log = ...
1,004
github-java-corpus
2,012
package com.pugh.sockso.web; import com.pugh.sockso.Constants; import com.pugh.sockso.Properties; import com.pugh.sockso.Utils; import com.pugh.sockso.db.Database; import com.pugh.sockso.music.Track; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.ArrayList; import java.util.Collec...
1,197
github-java-corpus
2,012
package com.pugh.sockso; import com.pugh.sockso.events.LatestVersionEvent; import com.pugh.sockso.events.LatestVersionListener; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.URL; import java.net.HttpURLConnection; import java.util.Vector; import java....
645
github-java-corpus
2,012
/* * FileResources.java * * Created on Jul 19, 2007, 11:00:21 AM * * Fetches resources straight from the file system * */ package com.pugh.sockso.resources; import java.io.File; import java.io.InputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.awt.Toolkit; import...
416
github-java-corpus
2,012
/* * Resources.java * * Created on Jun 24, 2007, 12:42:27 AM * * Allows access to the resources.jar file * */ package com.pugh.sockso.resources; import com.pugh.sockso.Utils; import java.io.InputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.BufferedReader; import jav...
476
github-java-corpus
2,012
/* * ResourceSource.java * * Created on Jul 19, 2007, 10:53:20 AM * * Abstract class for the different resource fetchers to extend. * */ package com.pugh.sockso.resources; import java.io.InputStream; import java.awt.Image; import org.apache.log4j.Logger; public interface Resources { public static fin...
264
github-java-corpus
2,012
/* * AbstractResources.java * * Created on Jul 24, 2007, 12:48:10 AM * * Superclass for all resource providers * */ package com.pugh.sockso.resources; import java.util.Hashtable; import java.util.Vector; import java.util.regex.Pattern; import java.util.regex.Matcher; public abstract class AbstractResource...
389
github-java-corpus
2,012
package com.pugh.sockso.resources; import com.google.inject.Inject; import com.google.inject.Singleton; import java.util.Hashtable; @Singleton public class LocaleFactory { private String defaultLocaleCode; private Hashtable<String,Locale> locales = null; private final Resources r; @Inject...
362
github-java-corpus
2,012
/* * Locale.java * * Created on Oct 7, 2007, 10:22:03 PM * * An implementation of locales that pulls it's information * from text files. * */ package com.pugh.sockso.resources; import com.pugh.sockso.Utils; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; impor...
884
github-java-corpus
2,012
package com.pugh.sockso.resources; import java.util.Set; public interface Locale { /** * returns the language code for this locale * * @return 2 char language code (eg. en, cy, etc...) * */ public String getLangCode(); /** * returns a string for the locale ke...
249
github-java-corpus
2,012
package com.pugh.sockso; import java.util.Vector; import java.util.Hashtable; import java.util.Set; /** * An in-memory properties class * * @author rod * */ public class StringProperties implements Properties { /** * The property data * */ protected final Hashtable<String,String> d...
1,410
github-java-corpus
2,012
package com.pugh.sockso; import com.pugh.sockso.cache.ObjectCacheGC; import com.pugh.sockso.inject.SocksoModule; import com.google.inject.Guice; import com.google.inject.Injector; import com.pugh.sockso.db.Database; import com.pugh.sockso.db.DBExporter; import com.pugh.sockso.gui.Splash; import com.pugh.sockso.music....
2,788
github-java-corpus
2,012
package com.pugh.sockso.commands; import java.util.Vector; public class CommandParser { /** * Returns the arguments to use for the command * * @param command * * @return * */ public String[] parseCommand( final String command ) { final Vector<String> arg...
273
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Properties; import com.pugh.sockso.resources.Locale; public class PropDel extends BaseCommand { private final Properties p; private final Locale locale; public PropDel( final Properties p, final Locale locale ) { this.p ...
251
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.music.CollectionManager; import com.pugh.sockso.resources.Locale; public class ColDel extends BaseCommand { private final Locale locale; private final CollectionManager cm; public ColDel( final CollectionManager cm, final Locale locale ) { ...
216
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Properties; import com.pugh.sockso.Utils; import com.pugh.sockso.resources.Locale; public class PropSet extends BaseCommand { private final Properties p; private final Locale locale; public PropSet( final Properties p, final Locale locale ) ...
272
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Properties; import java.util.Arrays; public class PropList extends BaseCommand { private final Properties p; public PropList( final Properties p ) { this.p = p; } public String getName() { retur...
616
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.db.Database; import com.pugh.sockso.music.Collection; import com.pugh.sockso.music.CollectionManager; import java.io.File; import java.sql.SQLException; public class ColScan extends BaseCommand { private final CollectionManager cm; private final Da...
336
github-java-corpus
2,012
package com.pugh.sockso.commands; abstract public class BaseCommand implements Command { public int getNumArgs() { return -1; } public String[] getArguments() { return new String[] {}; } }
52
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Utils; import com.pugh.sockso.db.Database; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; public class UserList extends BaseCommand { private final Database db; public UserList( final Database db ) { ...
362
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.music.CollectionManager; import com.pugh.sockso.resources.Locale; import java.io.File; public class ColAdd extends BaseCommand { private final Locale locale; private final CollectionManager cm; public ColAdd( final CollectionManager cm, fin...
286
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Utils; import com.pugh.sockso.db.Database; import com.pugh.sockso.resources.Locale; import java.sql.PreparedStatement; import java.sql.SQLException; public class UserActive extends BaseCommand { private final Locale locale; private final Database...
453
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Properties; import com.pugh.sockso.db.Database; import com.pugh.sockso.music.CollectionManager; import com.pugh.sockso.resources.Locale; import org.apache.log4j.Logger; import com.google.inject.Inject; /** * Executes console commands * */ public class Co...
855
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Main; public class Exit extends BaseCommand { public String getName() { return "exit"; } public String getDescription() { return "Exit Sockso"; } /** * handles the CMD_EXIT command * */ public...
93
github-java-corpus
2,012
package com.pugh.sockso.commands; /** * Interface for commands to implement. Their names need to be unique or one * command will override another * */ public interface Command { /** * Returns the name of the command (eg. proplist) * * @return * */ public String getName(); ...
231
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Utils; import com.pugh.sockso.db.Database; import com.pugh.sockso.resources.Locale; import java.sql.PreparedStatement; import java.sql.SQLException; import org.apache.log4j.Logger; public class UserAdmin extends BaseCommand { private Database db; ...
445
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Utils; import com.pugh.sockso.db.Database; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; public class ColList extends BaseCommand { private final Database db; public ColList( final Database db ) { ...
310
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.db.Database; import com.pugh.sockso.resources.Locale; import com.pugh.sockso.web.User; import java.sql.SQLException; public class UserDel extends BaseCommand { private final Database db; private final Locale locale; public UserDel( fina...
282
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Sockso; public class Version extends BaseCommand { public String getName() { return "version"; } public String getDescription() { return "Show version information"; } /** *...
98
github-java-corpus
2,012
package com.pugh.sockso.commands; import com.pugh.sockso.Validater; import com.pugh.sockso.ValidationException; import com.pugh.sockso.db.Database; import com.pugh.sockso.resources.Locale; import com.pugh.sockso.web.User; import java.sql.SQLException; public class UserAdd extends BaseCommand { private final Da...
458
github-java-corpus
2,012
/* * Validate.java * * Created on Aug 19, 2007, 12:52:43 PM * * A class for validating input. * */ package com.pugh.sockso; import com.pugh.sockso.db.Database; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.text.JTextComponent; import org.ap...
737
github-java-corpus
2,012
package com.pugh.sockso; import java.io.File; /** * provides static constants for the application * */ public class Constants { //********************************************************** //********************************************************** // // PROPERTIES // //**************...
1,504
github-java-corpus
2,012
package com.pugh.sockso.db; import com.pugh.sockso.Constants; import com.pugh.sockso.Properties; import com.pugh.sockso.Utils; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.io.File; import org.apache.lo...
1,732
github-java-corpus
2,012
/* * Exports data in various formats from a database * */ package com.pugh.sockso.db; import com.pugh.sockso.Utils; import com.pugh.sockso.templates.TXmlResultSet; import com.pugh.sockso.templates.TCsvResultSet; import com.pugh.sockso.templates.json.TResultSet; import java.sql.PreparedStatement; import java.sql...
499
github-java-corpus
2,012
package com.pugh.sockso.db; import com.pugh.sockso.Options; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.DriverManager; import org.apache.log4j.Logger; import joptsimple.OptionSet; import com.google.inject.Singleton; /** * provides an int...
2,159
github-java-corpus
2,012
/* * HSQLDatabase.java * * Created on Jul 21, 2007, 12:38:02 PM * * An implementation of the database class using HSQLDB * */ package com.pugh.sockso.db; import com.pugh.sockso.Constants; import com.pugh.sockso.Utils; import com.pugh.sockso.music.encoders.Encoders; import java.sql.DriverManager; import jav...
3,901
github-java-corpus
2,012
/* * Database.java * * Created on May 19, 2007, 10:14:52 PM * * Provides an interface over the database * */ package com.pugh.sockso.db; public abstract class AbstractDatabase implements Database {}
55
github-java-corpus
2,012
/* * SocksoDatabase.java * * Created on Jul 22, 2007, 10:58:04 AM * * The interface to the database. * */ package com.pugh.sockso.db; import java.sql.SQLException; import java.sql.ResultSet; import java.sql.Connection; import java.sql.PreparedStatement; import joptsimple.OptionSet; public interface Databa...
491
github-java-corpus
2,012
/* * An error has occurred trying to connect to the database. * */ package com.pugh.sockso.db; public class DatabaseConnectionException extends Exception { /** * constructor * * @param message * */ public DatabaseConnectionException( final String message ) { sup...
76
github-java-corpus
2,012
package com.pugh.sockso.db; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import joptsimple.OptionSet; import org.apache.log4j.Logger; import com.google.inject.Singleton; @Singleton public class SQLiteDatabase extends JDBCDatabase { private static final Logger log =...
1,288
github-java-corpus
2,012
/* * PropertiesListener.java * * Created on May 30, 2007, 11:53:56 PM * * A listener for property events * */ package com.pugh.sockso; public interface PropertiesListener { /** * handler for the event fired when properties have been saved * * @param properties the new properties ...
99
github-java-corpus
2,012
/* * ValidationError.java * * Created on Aug 19, 2007, 1:18:12 PM * * A validation error has occurred * */ package com.pugh.sockso; public class ValidationException extends Exception { /** * constructor * * @param message * */ public ValidationException( final Stri...
93
github-java-corpus
2,012
/* * Console.java * * Created on Jul 25, 2007, 11:18:07 AM * * This class creates a shell console for the user to * interact with sockso. * */ package com.pugh.sockso; import com.pugh.sockso.commands.CommandExecuter; import com.pugh.sockso.commands.CommandParser; import com.pugh.sockso.db.Database; import c...
822
github-java-corpus
2,012
/* * Services.java * * Created on Jun 25, 2007, 11:18:18 AM * * Provides services for interacting with UPNP devices * * UPNP library: http://www.sbbi.net/site/upnp/ * */ package com.pugh.sockso; import java.net.UnknownHostException; import java.io.IOException; import net.sbbi.upnp.impls.InternetGatewayD...
588
github-java-corpus
2,012
/* * MusicItem.java * * Created on May 17, 2007, 11:21:05 AM * * Represents an item in the collection * */ package com.pugh.sockso.music; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.DataFlavor; public class MusicItem implements Transferable { public static final DataFlavor ...
376
github-java-corpus
2,012
package com.pugh.sockso.music; import com.pugh.sockso.Utils; import java.util.Arrays; public class Files { public static final String DEFAULT_MIME_TYPE = "text/plain"; /** * Valid mime types of accepted media */ private static final String[] mimeTypes = { "audio/mpg", "audio/...
647
github-java-corpus
2,012
package com.pugh.sockso.music; import com.pugh.sockso.resources.Locale; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.image.BufferedImage; import org.apache.log4j.Logger; public class CoverArt { private String itemName; private Buffe...
927
github-java-corpus
2,012
package com.pugh.sockso.music.indexing; import com.pugh.sockso.Utils; import com.pugh.sockso.music.Files; import java.io.File; import java.io.FileFilter; public class TrackFileFilter implements FileFilter { /** * Decides if this file is a track or a directory * * @param file * * @re...
161
github-java-corpus
2,012
package com.pugh.sockso.music.indexing; import java.io.File; public interface Indexer { /** * Performs a scan on the index * */ public void scan(); /** * Scans a particluar directory that is part of the specified collection * * @param collectionId * @param di...
149
github-java-corpus
2,012
package com.pugh.sockso.music.indexing; import java.io.File; /** * An event fired by the Indexer to indicate a some kind of change in the index * */ public class IndexEvent { public static final int UNKNOWN = 1; public static final int MISSING = 2; public static final int CHANGED = 3; public s...
365
github-java-corpus
2,012
package com.pugh.sockso.music.indexing; public interface IndexListener { public void indexChanged( final IndexEvent evt ); }
29
github-java-corpus
2,012
package com.pugh.sockso.music.indexing; import com.pugh.sockso.db.Database; import java.io.FileFilter; import com.google.inject.Inject; import com.google.inject.Singleton; /** * Indexes tracks for the collection * */ @Singleton public class TrackIndexer extends BaseIndexer { /** * Constructor ...
319
github-java-corpus
2,012
package com.pugh.sockso.music.indexing; import java.util.Hashtable; public class IndexCache { private final Hashtable<String,Integer> cache; /** * Constructor * */ public IndexCache() { cache = new Hashtable<String,Integer>(); } /** * Adds a string to the cach...
259
github-java-corpus
2,012
package com.pugh.sockso.music.indexing; import com.pugh.sockso.db.Database; import java.util.Vector; import java.sql.ResultSet; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Date; import java.io.File; import java.io.FileFilter; import org.apache.log4j.Logger; /** * Scans and ...
2,201
github-java-corpus
2,012
package com.pugh.sockso.music.indexing; import com.pugh.sockso.Constants; import com.pugh.sockso.music.CoverArt; import com.pugh.sockso.cache.CoverArtCache; import com.pugh.sockso.Properties; import com.pugh.sockso.cache.CacheException; import org.apache.log4j.Logger; public class CoverArtIndexer { private fi...
285
github-java-corpus
2,012
package com.pugh.sockso.music.tag; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import com.pugh.sockso.music.tag.aac.AACMetaData; public class AACTag extends AudioTag { /** * Alternate method, calls exte...
473
github-java-corpus
2,012
package com.pugh.sockso.music.tag.aac; public class Atom { private AtomHeader header; private String data; public Atom(AtomHeader header, byte[] data) { this.header = header; if (header.getType() == AtomType.TRACK || header.getType() == AtomType.DISC) { long index = FileUtil.readLong(data, 10, 2); lo...
232
github-java-corpus
2,012
package com.pugh.sockso.music.tag.aac; import java.io.FileInputStream; import java.io.IOException; import java.util.Arrays; import java.util.Set; import java.util.TreeSet; public class AtomHeader { public static int SIZE = 8; long size; AtomType type; private static Set<AtomType> haveSubAtomsList = new TreeSet<...
444
github-java-corpus
2,012
package com.pugh.sockso.music.tag.aac; import java.io.FileInputStream; import java.io.IOException; public class FileUtil { public static long readLong(byte[] data, int offset, int bytes) { long value = 0; for (int i = 0; i < bytes && (i + offset) < data.length; i++) { value = (value << 8) + (int) data[i + off...
163
github-java-corpus
2,012
package com.pugh.sockso.music.tag.aac; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; /** * This class and all related classes were created using * logic extracted from the faac project code. * * http://sourceforge.net/projects/faac/ * * @author ...
885
github-java-corpus
2,012
package com.pugh.sockso.music.tag.aac; public enum AtomType { FTYP("ftyp") ,MDAT("mdat") ,MVHD("mvhd") ,TKHD("tkhd") ,MDHD("mdhd") ,VMHD("vmhd") ,SMHD("smhd") ,HMHD("hmhd") ,STSD("stsd") ,STTS("stts") ,STSZ("stsz") ,STZ2("stz2") ,STCO("stco") ,STSC("stsc") ,MP4A("mp4a") ,MP4V("mp4v") ,MP4S("mp4s") ,E...
683
github-java-corpus
2,012
/* * AudioTag.java * * Created on Jun 8, 2007, 10:30:10 PM * * This class is designed to be an abstraction over various different tagging * types. We only need some simple information, just use the static getTag() * method and hopefully you'll get a tag object back you can use! :P * */ package com.pugh.s...
1,980
github-java-corpus
2,012
/* * NoTagException.java * * Created on Jun 8, 2007, 10:45:16 PM * * This exception indicates that there was an error reading the tag * for an audio file. This could be that there is just no tag there. * */ package com.pugh.sockso.music.tag; import java.io.File; public class InvalidTagException extends E...
114
github-java-corpus
2,012
package com.pugh.sockso.music.tag; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import org.kc7bfi.jflac.FLACDecoder; import org.kc7bfi.jflac.metadata.Metadata; import org.kc7bfi.jflac.metadata.VorbisComment; import org.apache.log4j.Logger; import com.pugh.sockso.Utils; /** * ...
484
github-java-corpus
2,012
/* * OggTag.java * * Created on Jun 9, 2007, 1:28:56 AM * * NB: This code was originally taken from the example code provided * with the jorbis library: http://www.jcraft.com/jorbis/ * */ package com.pugh.sockso.music.tag; import java.io.IOException; import java.io.InputStream; import java.io.File; impor...
1,548
github-java-corpus
2,012
/* * ByteOrder.java * * Created on Jun 14, 2007, 10:19:14 AM * * code originally taken from limewire: http://limewire.com * */ package com.pugh.sockso.music.tag; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class ByteOrder { /** * Returns the rev...
6,515
github-java-corpus
2,012
package com.pugh.sockso.music.tag; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; /** * Specified the interface a tag needs to implement * * @author rod * */ public interface Tag { /** * Parses the audio file to extract tag information * * @param f...
281
github-java-corpus
2,012
/** * Uses jaudiotagger to read mp3 v1 & v2 tags * */ package com.pugh.sockso.music.tag; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import org.jaudiotagger.audio.AudioFileIO; import org.jaudiotagger.audio.mp3.MP3File; import org.jaudiotagger.tag.d...
747
github-java-corpus
2,012
/* * WmaTag.java * * Created on Jun 9, 2007, 1:17:17 PM * * This code was originally taken from Limewire: http://limewire.com, which in * turn got it from some other places, follow the trail... * */ package com.pugh.sockso.music.tag; import com.pugh.sockso.Utils; import java.io.File; import java.io.IOExce...
5,919
github-java-corpus
2,012
package com.pugh.sockso.music; import com.pugh.sockso.Utils; import com.pugh.sockso.db.Database; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Date; import java.util.Vector; import org.apache.log4j.Logger; public class Artist extends MusicItem { ...
886
github-java-corpus
2,012
package com.pugh.sockso.music; import com.pugh.sockso.Utils; import com.pugh.sockso.db.Database; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Date; import java.util.Vector; public class Album extends MusicItem { private final Artist artist; p...
1,356
github-java-corpus
2,012
package com.pugh.sockso.music.encoders; import com.pugh.sockso.music.Track; import com.pugh.sockso.music.Files; import java.io.IOException; import java.io.DataInputStream; /** * this class converts ogg vorbis to mp3 with oggdec and lame * * @author rod * */ public class OggDecToLame extends BuiltinScriptEnc...
194
github-java-corpus
2,012
/* * The interface that built in sockso encoders need to implement * */ package com.pugh.sockso.music.encoders; import com.pugh.sockso.music.Track; import java.io.IOException; import java.io.DataInputStream; public interface BuiltinEncoder { /** * returns an array of file extensions for formats this ...
308
github-java-corpus
2,012
/* * A class to do with using different builtins within sockso * */ package com.pugh.sockso.music.encoders; import java.util.Vector; public class Encoders { // different types of encoding public enum Type { NONE, BUILTIN, CUSTOM }; public enum Builtin { ...
470
github-java-corpus
2,012
package com.pugh.sockso.music.encoders; import com.pugh.sockso.music.Track; import com.pugh.sockso.music.Files; import java.io.IOException; import java.io.DataInputStream; /** * uses ffmpeg and lame to re-encode from wma to mp3 * */ public class FfmpegToLame extends BuiltinScriptEncoder { public String[]...
190
github-java-corpus
2,012
package com.pugh.sockso.music.encoders; import com.pugh.sockso.music.Track; import java.io.DataInputStream; import java.io.IOException; /** * Adds a nice utility method for encoders that use builtin scripts * to do re-encoding (saving duplicated functionality) * */ public abstract class BuiltinScriptEncoder...
303
github-java-corpus
2,012
/* * All built in encoders should extend this class * */ package com.pugh.sockso.music.encoders; import java.io.IOException; import java.io.DataInputStream; import org.apache.log4j.Logger; public abstract class AbstractBuiltinEncoder implements BuiltinEncoder { protected final Logger log = Logger.getL...
206
github-java-corpus
2,012
package com.pugh.sockso.music.encoders; import com.pugh.sockso.music.Track; import com.pugh.sockso.music.Files; import java.io.IOException; import java.io.DataInputStream; /** * Re-encodes flac files to mp3 * */ public class FlacToLame extends BuiltinScriptEncoder { public String[] getSupportedFormats() ...
180
github-java-corpus
2,012
/* * Allows streaming of data using lame * */ package com.pugh.sockso.music.encoders; import com.pugh.sockso.music.Track; import com.pugh.sockso.music.Files; import java.io.IOException; import java.io.DataInputStream; public class LameEncoder extends AbstractBuiltinEncoder { @Override public String to...
229
github-java-corpus
2,012
package com.pugh.sockso.music; import com.pugh.sockso.Utils; import com.pugh.sockso.db.Database; import com.pugh.sockso.web.BadRequestException; import com.pugh.sockso.web.User; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Vector; public class Playlis...
1,559
github-java-corpus
2,012
/* * CollectionManagerListener.java * * Created on May 12, 2007, 5:40 PM * * An interface to listen for collection manager events * */ package com.pugh.sockso.music; public interface CollectionManagerListener { public static final int ERROR = 0; public static final int ARTIST_ADDED = 1; public s...
164
github-java-corpus
2,012
package com.pugh.sockso.music.scheduling; import com.pugh.sockso.Constants; import com.pugh.sockso.Properties; import com.pugh.sockso.music.indexing.Indexer; import java.util.Calendar; import java.util.Date; import org.apache.log4j.Logger; public class SimpleScheduler implements Scheduler { private static fin...
264
github-java-corpus
2,012
package com.pugh.sockso.music.scheduling; import com.pugh.sockso.Constants; import com.pugh.sockso.Properties; import java.util.Date; import java.util.Calendar; import org.apache.log4j.Logger; /** * This scheduler accepts a cron style specification for when it should run * * Example: * * scheduler.cron.tab...
1,642
github-java-corpus
2,012
package com.pugh.sockso.music.scheduling; import java.util.Date; /** * The scheduler manages running the indexer on a schedule which is defined * in the application settings. * */ public interface Scheduler { /** * This method returns a boolean indicating if the scheduler should * mick off the in...
92
github-java-corpus
2,012
package com.pugh.sockso.music.scheduling; import com.pugh.sockso.Properties; import com.pugh.sockso.music.indexing.Indexer; import java.util.Calendar; import org.apache.log4j.Logger; import com.google.inject.Inject; import com.google.inject.Singleton; /** * The scheduler runner provides the functionality to run...
397
github-java-corpus
2,012
package com.pugh.sockso.music.scheduling; import java.util.Date; /** * The manual scheduler never runs the indexer, so to update the collection * you need to manually run the scan. * */ public class ManualScheduler implements Scheduler { /** * Always return false * * @param date * ...
104
github-java-corpus
2,012
package com.pugh.sockso.music; import com.pugh.sockso.Utils; import com.pugh.sockso.db.Database; import java.io.File; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; /** * Represents a collection of music, rooted at a certain folder. * */ public class Collection ext...
671
github-java-corpus
2,012
package com.pugh.sockso.music.playlist; import com.pugh.sockso.Utils; import java.io.File; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.FileInputStream; import java.util.ArrayList; import org.apache.log4j.Logger; /** * this class allows access to th...
870
github-java-corpus
2,012
package com.pugh.sockso.music.playlist; /** * defines the interface for classes that allow access to playlist files like * m3u, pls, etc... and also provides the method getPlaylistFile() to fetch * a class of the correct type for each playlist we can handle. * */ import com.pugh.sockso.Utils; import java....
341
github-java-corpus
2,012
package com.pugh.sockso.music; import com.pugh.sockso.Utils; import com.pugh.sockso.db.Database; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Vector; import com.google.inject.Singleton; /** * a class for searching for music * */ @Singleton publ...
974
github-java-corpus
2,012
package com.pugh.sockso.music; import com.pugh.sockso.Constants; import com.pugh.sockso.Properties; import com.pugh.sockso.db.Database; import com.pugh.sockso.Utils; import com.pugh.sockso.web.BadRequestException; import com.pugh.sockso.web.User; import java.sql.PreparedStatement; import java.sql.ResultSet; import j...
2,655
github-java-corpus
2,012
/** * CollectionManager.java * * Created on May 10, 2007, 9:50 PM * */ package com.pugh.sockso.music; import com.pugh.sockso.web.User; import java.io.File; public interface CollectionManager { public static final int DEFAULT_SCAN_INTERVAL = 5; // minutes /** * checks the collection for upda...
615
github-java-corpus
2,012
package com.pugh.sockso.music; import com.pugh.sockso.Utils; import com.pugh.sockso.Constants; import com.pugh.sockso.Properties; import com.pugh.sockso.db.Database; import com.pugh.sockso.music.indexing.CoverArtIndexer; import com.pugh.sockso.music.indexing.Indexer; import com.pugh.sockso.music.indexing.IndexEvent; ...
6,511
github-java-corpus
2,012
package com.pugh.sockso; import com.pugh.sockso.events.LatestVersionListener; /** * interface for Sockso managers like the GUI or and the Console * */ public interface Manager extends LatestVersionListener { /** * closes the manager * */ public void close(); /** * open...
98
github-java-corpus
2,012
package com.pugh.sockso.cache; import org.apache.log4j.Logger; /** * Timed cached implements simple cache with optional timeout for keys. At * the moment this is implemented through extension, but might be a good idea * at some point to refactor to use composition instead. * */ abstract public class TimedC...
719
github-java-corpus
2,012
package com.pugh.sockso.cache; /** * * @author Nathan Perrier */ public class CacheException extends Exception { public CacheException( String msg, Throwable t ) { super( msg, t ); } public CacheException( String msg ) { super( msg ); } public CacheException( Throwabl...
81
github-java-corpus
2,012
package com.pugh.sockso.cache; import java.util.Date; /** * Cache object that can be time expired * */ class CachedObject { private final Object value; private final int expiresAt; /** * Create a new cached object, that optionally expires after the given * number of seconds. ...
271
github-java-corpus
2,012
package com.pugh.sockso.cache; import com.google.inject.Singleton; import java.util.HashMap; import java.util.Set; import org.apache.log4j.Logger; /** * The object cache implements an in memory data store * */ @Singleton public class ObjectCache extends TimedCache { private static final Logger log = Logg...
345
github-java-corpus
2,012
package com.pugh.sockso.cache; import com.google.inject.Inject; import java.util.Set; import org.apache.log4j.Logger; public class ObjectCacheGC extends Thread { private static final int GC_INTERVAL_IN_MINUTES = 5; private static final Logger log = Logger.getLogger( ObjectCacheGC.class ); ...
347