id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
150,600
jtrfp/javamod
src/main/java/de/quippy/jflac/metadata/SeekPoint.java
SeekPoint.write
public void write(BitOutputStream os) throws IOException { os.writeRawULong(sampleNumber, SEEKPOINT_SAMPLE_NUMBER_LEN); os.writeRawULong(streamOffset, SEEKPOINT_STREAM_OFFSET_LEN); os.writeRawUInt(frameSamples, SEEKPOINT_FRAME_SAMPLES_LEN); }
java
public void write(BitOutputStream os) throws IOException { os.writeRawULong(sampleNumber, SEEKPOINT_SAMPLE_NUMBER_LEN); os.writeRawULong(streamOffset, SEEKPOINT_STREAM_OFFSET_LEN); os.writeRawUInt(frameSamples, SEEKPOINT_FRAME_SAMPLES_LEN); }
[ "public", "void", "write", "(", "BitOutputStream", "os", ")", "throws", "IOException", "{", "os", ".", "writeRawULong", "(", "sampleNumber", ",", "SEEKPOINT_SAMPLE_NUMBER_LEN", ")", ";", "os", ".", "writeRawULong", "(", "streamOffset", ",", "SEEKPOINT_STREAM_OFFSET_...
Write out an individual seek point. @param os The output stream @throws IOException Thrown if error writing data
[ "Write", "out", "an", "individual", "seek", "point", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/metadata/SeekPoint.java#L70-L75
150,601
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AbstractClassLoader.java
AbstractClassLoader.addSubLoader
public final void addSubLoader(AbstractClassLoader loader) { if (subLoaders == null) subLoaders = new ArrayList<>(); subLoaders.add(loader); }
java
public final void addSubLoader(AbstractClassLoader loader) { if (subLoaders == null) subLoaders = new ArrayList<>(); subLoaders.add(loader); }
[ "public", "final", "void", "addSubLoader", "(", "AbstractClassLoader", "loader", ")", "{", "if", "(", "subLoaders", "==", "null", ")", "subLoaders", "=", "new", "ArrayList", "<>", "(", ")", ";", "subLoaders", ".", "add", "(", "loader", ")", ";", "}" ]
Add a class loader from a resource contained by this class loader, for example an inner jar file.
[ "Add", "a", "class", "loader", "from", "a", "resource", "contained", "by", "this", "class", "loader", "for", "example", "an", "inner", "jar", "file", "." ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AbstractClassLoader.java#L69-L72
150,602
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AbstractClassLoader.java
AbstractClassLoader.getClassLoadingSP
public static ISynchronizationPoint<NoException> getClassLoadingSP(String name) { synchronized (classLoadingSP) { Pair<Thread,JoinPoint<NoException>> p = classLoadingSP.get(name); if (p == null) { JoinPoint<NoException> jp = new JoinPoint<NoException>(); jp.addToJoin(1); jp.start(); class...
java
public static ISynchronizationPoint<NoException> getClassLoadingSP(String name) { synchronized (classLoadingSP) { Pair<Thread,JoinPoint<NoException>> p = classLoadingSP.get(name); if (p == null) { JoinPoint<NoException> jp = new JoinPoint<NoException>(); jp.addToJoin(1); jp.start(); class...
[ "public", "static", "ISynchronizationPoint", "<", "NoException", ">", "getClassLoadingSP", "(", "String", "name", ")", "{", "synchronized", "(", "classLoadingSP", ")", "{", "Pair", "<", "Thread", ",", "JoinPoint", "<", "NoException", ">", ">", "p", "=", "class...
Get the synchronized object for loading the given class.
[ "Get", "the", "synchronized", "object", "for", "loading", "the", "given", "class", "." ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AbstractClassLoader.java#L77-L93
150,603
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AbstractClassLoader.java
AbstractClassLoader.releaseClassLoadingSP
public static void releaseClassLoadingSP(String name) { synchronized (classLoadingSP) { Pair<Thread,JoinPoint<NoException>> sp = classLoadingSP.get(name); JoinPoint<NoException> jp = sp.getValue2(); jp.joined(); if (jp.isUnblocked()) classLoadingSP.remove(name); } }
java
public static void releaseClassLoadingSP(String name) { synchronized (classLoadingSP) { Pair<Thread,JoinPoint<NoException>> sp = classLoadingSP.get(name); JoinPoint<NoException> jp = sp.getValue2(); jp.joined(); if (jp.isUnblocked()) classLoadingSP.remove(name); } }
[ "public", "static", "void", "releaseClassLoadingSP", "(", "String", "name", ")", "{", "synchronized", "(", "classLoadingSP", ")", "{", "Pair", "<", "Thread", ",", "JoinPoint", "<", "NoException", ">", ">", "sp", "=", "classLoadingSP", ".", "get", "(", "name"...
Release the synchronized object for loading the given class.
[ "Release", "the", "synchronized", "object", "for", "loading", "the", "given", "class", "." ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AbstractClassLoader.java#L96-L104
150,604
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AbstractClassLoader.java
AbstractClassLoader.open
public final IO.Readable open(String path, byte priority) throws IOException { Object pointer = getResourcePointer(path); AbstractClassLoader cl = this; if (pointer == null) { if (subLoaders != null) for (AbstractClassLoader sub : subLoaders) { pointer = sub.getResourcePointer(path); if (p...
java
public final IO.Readable open(String path, byte priority) throws IOException { Object pointer = getResourcePointer(path); AbstractClassLoader cl = this; if (pointer == null) { if (subLoaders != null) for (AbstractClassLoader sub : subLoaders) { pointer = sub.getResourcePointer(path); if (p...
[ "public", "final", "IO", ".", "Readable", "open", "(", "String", "path", ",", "byte", "priority", ")", "throws", "IOException", "{", "Object", "pointer", "=", "getResourcePointer", "(", "path", ")", ";", "AbstractClassLoader", "cl", "=", "this", ";", "if", ...
Open a resource.
[ "Open", "a", "resource", "." ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AbstractClassLoader.java#L199-L215
150,605
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AbstractClassLoader.java
AbstractClassLoader.getResourcesURL
public final Iterable<URL> getResourcesURL(String name) { URL url = loadResourceURL(name); if (subLoaders == null) return url != null ? Collections.singletonList(url) : null; CompoundCollection<URL> list = new CompoundCollection<>(); if (url != null) list.addSingleton(url); for (AbstractClassLoader s...
java
public final Iterable<URL> getResourcesURL(String name) { URL url = loadResourceURL(name); if (subLoaders == null) return url != null ? Collections.singletonList(url) : null; CompoundCollection<URL> list = new CompoundCollection<>(); if (url != null) list.addSingleton(url); for (AbstractClassLoader s...
[ "public", "final", "Iterable", "<", "URL", ">", "getResourcesURL", "(", "String", "name", ")", "{", "URL", "url", "=", "loadResourceURL", "(", "name", ")", ";", "if", "(", "subLoaders", "==", "null", ")", "return", "url", "!=", "null", "?", "Collections"...
Search for all resources with the same path.
[ "Search", "for", "all", "resources", "with", "the", "same", "path", "." ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AbstractClassLoader.java#L229-L240
150,606
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/MPEGAudioFrameHeader.java
MPEGAudioFrameHeader.findFrame
private long findFrame(RandomAccessInputStream raf, int offset) throws IOException { long loc = -1; raf.seek(offset); while (loc == -1) { byte test = raf.readByte(); if ((test & 0xFF) == 0xFF) { test = raf.readByte(); if ((test & 0xE0) == 0xE0) { return raf.getFilePointer() - 2; ...
java
private long findFrame(RandomAccessInputStream raf, int offset) throws IOException { long loc = -1; raf.seek(offset); while (loc == -1) { byte test = raf.readByte(); if ((test & 0xFF) == 0xFF) { test = raf.readByte(); if ((test & 0xE0) == 0xE0) { return raf.getFilePointer() - 2; ...
[ "private", "long", "findFrame", "(", "RandomAccessInputStream", "raf", ",", "int", "offset", ")", "throws", "IOException", "{", "long", "loc", "=", "-", "1", ";", "raf", ".", "seek", "(", "offset", ")", ";", "while", "(", "loc", "==", "-", "1", ")", ...
Searches through the file and finds the first occurrence of an mpeg frame. Returns the location of the header of the frame. @param offset the offset to start searching from @return the location of the header of the frame @exception FileNotFoundException if an error occurs @exception IOException if an error occurs
[ "Searches", "through", "the", "file", "and", "finds", "the", "first", "occurrence", "of", "an", "mpeg", "frame", ".", "Returns", "the", "location", "of", "the", "header", "of", "the", "frame", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MPEGAudioFrameHeader.java#L194-L215
150,607
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/MPEGAudioFrameHeader.java
MPEGAudioFrameHeader.readHeader
private void readHeader(RandomAccessInputStream raf, long location) throws IOException { byte[] head = new byte[HEADER_SIZE]; raf.seek(location); if (raf.read(head) != HEADER_SIZE) { throw new IOException("Error reading MPEG frame header."); } version = (head[1]&0x18)>>3; layer = (head[1]&0x06)>>1; ...
java
private void readHeader(RandomAccessInputStream raf, long location) throws IOException { byte[] head = new byte[HEADER_SIZE]; raf.seek(location); if (raf.read(head) != HEADER_SIZE) { throw new IOException("Error reading MPEG frame header."); } version = (head[1]&0x18)>>3; layer = (head[1]&0x06)>>1; ...
[ "private", "void", "readHeader", "(", "RandomAccessInputStream", "raf", ",", "long", "location", ")", "throws", "IOException", "{", "byte", "[", "]", "head", "=", "new", "byte", "[", "HEADER_SIZE", "]", ";", "raf", ".", "seek", "(", "location", ")", ";", ...
Read in all the information found in the mpeg header. @param location the location of the header (found by findFrame) @exception FileNotFoundException if an error occurs @exception IOException if an error occurs
[ "Read", "in", "all", "the", "information", "found", "in", "the", "mpeg", "header", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MPEGAudioFrameHeader.java#L224-L243
150,608
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/MPEGAudioFrameHeader.java
MPEGAudioFrameHeader.findBitRate
private int findBitRate(int bitrateIndex, int version, int layer) { int ind = -1; if (version == MPEG_V_1) { if (layer == MPEG_L_1) { ind = 0; } else if (layer == MPEG_L_2) { ind = 1; } else if (layer == MPEG_L_3) { ind = 2; } } else if ((version == MPEG_V_2) || (versi...
java
private int findBitRate(int bitrateIndex, int version, int layer) { int ind = -1; if (version == MPEG_V_1) { if (layer == MPEG_L_1) { ind = 0; } else if (layer == MPEG_L_2) { ind = 1; } else if (layer == MPEG_L_3) { ind = 2; } } else if ((version == MPEG_V_2) || (versi...
[ "private", "int", "findBitRate", "(", "int", "bitrateIndex", ",", "int", "version", ",", "int", "layer", ")", "{", "int", "ind", "=", "-", "1", ";", "if", "(", "version", "==", "MPEG_V_1", ")", "{", "if", "(", "layer", "==", "MPEG_L_1", ")", "{", "...
Based on the bitrate index found in the header, try to find and set the bitrate from the table. @param bitrateIndex the bitrate index read from the header
[ "Based", "on", "the", "bitrate", "index", "found", "in", "the", "header", "try", "to", "find", "and", "set", "the", "bitrate", "from", "the", "table", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MPEGAudioFrameHeader.java#L251-L287
150,609
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/MPEGAudioFrameHeader.java
MPEGAudioFrameHeader.findSampleRate
private int findSampleRate(int sampleIndex, int version) { int ind = -1; switch (version) { case MPEG_V_1: ind = 0; break; case MPEG_V_2: ind = 1; break; case MPEG_V_25: ind = 2; } if ((ind != -1) && (sampleIndex >= 0) && (sampleIndex <= 3)) { return sampleTable[sampleInde...
java
private int findSampleRate(int sampleIndex, int version) { int ind = -1; switch (version) { case MPEG_V_1: ind = 0; break; case MPEG_V_2: ind = 1; break; case MPEG_V_25: ind = 2; } if ((ind != -1) && (sampleIndex >= 0) && (sampleIndex <= 3)) { return sampleTable[sampleInde...
[ "private", "int", "findSampleRate", "(", "int", "sampleIndex", ",", "int", "version", ")", "{", "int", "ind", "=", "-", "1", ";", "switch", "(", "version", ")", "{", "case", "MPEG_V_1", ":", "ind", "=", "0", ";", "break", ";", "case", "MPEG_V_2", ":"...
Based on the sample rate index found in the header, attempt to lookup and set the sample rate from the table. @param sampleIndex the sample rate index read from the header
[ "Based", "on", "the", "sample", "rate", "index", "found", "in", "the", "header", "attempt", "to", "lookup", "and", "set", "the", "sample", "rate", "from", "the", "table", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MPEGAudioFrameHeader.java#L295-L316
150,610
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/MPEGAudioFrameHeader.java
MPEGAudioFrameHeader.getEmphasis
public String getEmphasis() { String str = null; if ((emphasis >= 0) && (emphasis < emphasisLabels.length)) { str = emphasisLabels[emphasis]; } return str; }
java
public String getEmphasis() { String str = null; if ((emphasis >= 0) && (emphasis < emphasisLabels.length)) { str = emphasisLabels[emphasis]; } return str; }
[ "public", "String", "getEmphasis", "(", ")", "{", "String", "str", "=", "null", ";", "if", "(", "(", "emphasis", ">=", "0", ")", "&&", "(", "emphasis", "<", "emphasisLabels", ".", "length", ")", ")", "{", "str", "=", "emphasisLabels", "[", "emphasis", ...
Returns the emphasis. I don't know what this means, it just does it... @return the emphasis
[ "Returns", "the", "emphasis", ".", "I", "don", "t", "know", "what", "this", "means", "it", "just", "does", "it", "..." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MPEGAudioFrameHeader.java#L438-L448
150,611
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java
ID3v1Tag.checkHeader
private boolean checkHeader(RandomAccessInputStream raf) throws FileNotFoundException, IOException { boolean retval = false; if (raf.length() > TAG_SIZE) { raf.seek(raf.length() - TAG_SIZE); byte[] buf = new byte[3]; if (raf.read(buf) != 3) { throw new IOException("Error encountered reading ID3...
java
private boolean checkHeader(RandomAccessInputStream raf) throws FileNotFoundException, IOException { boolean retval = false; if (raf.length() > TAG_SIZE) { raf.seek(raf.length() - TAG_SIZE); byte[] buf = new byte[3]; if (raf.read(buf) != 3) { throw new IOException("Error encountered reading ID3...
[ "private", "boolean", "checkHeader", "(", "RandomAccessInputStream", "raf", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "boolean", "retval", "=", "false", ";", "if", "(", "raf", ".", "length", "(", ")", ">", "TAG_SIZE", ")", "{", "raf", ...
Checks whether a header for the id3 tag exists yet @return true if a tag is found @exception FileNotFoundException if an error occurs @exception IOException if an error occurs
[ "Checks", "whether", "a", "header", "for", "the", "id3", "tag", "exists", "yet" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java#L107-L128
150,612
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java
ID3v1Tag.readTag
private void readTag(RandomAccessInputStream raf) throws FileNotFoundException, IOException { raf.seek(raf.length() - TAG_SIZE); byte[] buf = new byte[TAG_SIZE]; raf.read(buf, 0, TAG_SIZE); String tag = new String(buf, 0, TAG_SIZE, ENC_TYPE); int start = TAG_START.length(); title = tag.substring(start, sta...
java
private void readTag(RandomAccessInputStream raf) throws FileNotFoundException, IOException { raf.seek(raf.length() - TAG_SIZE); byte[] buf = new byte[TAG_SIZE]; raf.read(buf, 0, TAG_SIZE); String tag = new String(buf, 0, TAG_SIZE, ENC_TYPE); int start = TAG_START.length(); title = tag.substring(start, sta...
[ "private", "void", "readTag", "(", "RandomAccessInputStream", "raf", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "raf", ".", "seek", "(", "raf", ".", "length", "(", ")", "-", "TAG_SIZE", ")", ";", "byte", "[", "]", "buf", "=", "new", ...
Reads the data from the id3v1 tag @exception FileNotFoundException if an error occurs @exception IOException if an error occurs
[ "Reads", "the", "data", "from", "the", "id3v1", "tag" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java#L136-L150
150,613
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java
ID3v1Tag.writeTag
public void writeTag(RandomAccessFile raf) throws FileNotFoundException, IOException { if (headerExists) raf.seek(raf.length() - TAG_SIZE); else raf.seek(raf.length()); raf.write(Helpers.getBytesFromString(TAG_START, TAG_START.length(), ENC_TYPE)); raf.write(Helpers.getBytesFromString(title, TITLE_SIZE...
java
public void writeTag(RandomAccessFile raf) throws FileNotFoundException, IOException { if (headerExists) raf.seek(raf.length() - TAG_SIZE); else raf.seek(raf.length()); raf.write(Helpers.getBytesFromString(TAG_START, TAG_START.length(), ENC_TYPE)); raf.write(Helpers.getBytesFromString(title, TITLE_SIZE...
[ "public", "void", "writeTag", "(", "RandomAccessFile", "raf", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "if", "(", "headerExists", ")", "raf", ".", "seek", "(", "raf", ".", "length", "(", ")", "-", "TAG_SIZE", ")", ";", "else", "raf"...
Writes the information in this tag to the file specified in the constructor. If a tag does not exist, one will be created. If a tag already exists, it will be overwritten. @exception FileNotFoundException if an error occurs @exception IOException if an error occurs
[ "Writes", "the", "information", "in", "this", "tag", "to", "the", "file", "specified", "in", "the", "constructor", ".", "If", "a", "tag", "does", "not", "exist", "one", "will", "be", "created", ".", "If", "a", "tag", "already", "exists", "it", "will", ...
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java#L160-L177
150,614
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java
ID3v1Tag.removeTag
public void removeTag(RandomAccessFile raf) throws FileNotFoundException, IOException { if (headerExists) { raf.setLength(raf.length() - TAG_SIZE); headerExists = false; } }
java
public void removeTag(RandomAccessFile raf) throws FileNotFoundException, IOException { if (headerExists) { raf.setLength(raf.length() - TAG_SIZE); headerExists = false; } }
[ "public", "void", "removeTag", "(", "RandomAccessFile", "raf", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "if", "(", "headerExists", ")", "{", "raf", ".", "setLength", "(", "raf", ".", "length", "(", ")", "-", "TAG_SIZE", ")", ";", "h...
Removes the id3v1 tag from the file specified in the constructor by reducing the file size @return true if the tag was removed successfully @exception FileNotFoundException if an error occurs @exception IOException if an error occurs
[ "Removes", "the", "id3v1", "tag", "from", "the", "file", "specified", "in", "the", "constructor", "by", "reducing", "the", "file", "size" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java#L186-L193
150,615
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java
ID3v1Tag.setTitle
public void setTitle(String newTitle) { if (newTitle.length() > TITLE_SIZE) { title = newTitle.substring(0, TITLE_SIZE); } else { title = newTitle; } }
java
public void setTitle(String newTitle) { if (newTitle.length() > TITLE_SIZE) { title = newTitle.substring(0, TITLE_SIZE); } else { title = newTitle; } }
[ "public", "void", "setTitle", "(", "String", "newTitle", ")", "{", "if", "(", "newTitle", ".", "length", "(", ")", ">", "TITLE_SIZE", ")", "{", "title", "=", "newTitle", ".", "substring", "(", "0", ",", "TITLE_SIZE", ")", ";", "}", "else", "{", "titl...
Set the title field of the tag. The maximum size of the String is 30. If the size exceeds the maximum size, the String will be truncated. @param newTitle the title for the tag
[ "Set", "the", "title", "field", "of", "the", "tag", ".", "The", "maximum", "size", "of", "the", "String", "is", "30", ".", "If", "the", "size", "exceeds", "the", "maximum", "size", "the", "String", "will", "be", "truncated", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java#L254-L264
150,616
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java
ID3v1Tag.setArtist
public void setArtist(String newArtist) { if (newArtist.length() > ARTIST_SIZE) { artist = newArtist.substring(0, ARTIST_SIZE); } else { artist = newArtist; } }
java
public void setArtist(String newArtist) { if (newArtist.length() > ARTIST_SIZE) { artist = newArtist.substring(0, ARTIST_SIZE); } else { artist = newArtist; } }
[ "public", "void", "setArtist", "(", "String", "newArtist", ")", "{", "if", "(", "newArtist", ".", "length", "(", ")", ">", "ARTIST_SIZE", ")", "{", "artist", "=", "newArtist", ".", "substring", "(", "0", ",", "ARTIST_SIZE", ")", ";", "}", "else", "{", ...
Set the artist field of the tag. The maximum size of the String is 30. If the size exceeds the maximum size, the String will be truncated. @param newArtist the artist for the tag
[ "Set", "the", "artist", "field", "of", "the", "tag", ".", "The", "maximum", "size", "of", "the", "String", "is", "30", ".", "If", "the", "size", "exceeds", "the", "maximum", "size", "the", "String", "will", "be", "truncated", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java#L282-L292
150,617
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java
ID3v1Tag.setAlbum
public void setAlbum(String newAlbum) { if (newAlbum.length() > ALBUM_SIZE) { album = newAlbum.substring(0, ALBUM_SIZE); } else { album = newAlbum; } }
java
public void setAlbum(String newAlbum) { if (newAlbum.length() > ALBUM_SIZE) { album = newAlbum.substring(0, ALBUM_SIZE); } else { album = newAlbum; } }
[ "public", "void", "setAlbum", "(", "String", "newAlbum", ")", "{", "if", "(", "newAlbum", ".", "length", "(", ")", ">", "ALBUM_SIZE", ")", "{", "album", "=", "newAlbum", ".", "substring", "(", "0", ",", "ALBUM_SIZE", ")", ";", "}", "else", "{", "albu...
Set the album field of the tag. The maximum size of the String is 30. If the size exceeds the maximum size, the String will be truncated. @param newAlbum the album for the tag
[ "Set", "the", "album", "field", "of", "the", "tag", ".", "The", "maximum", "size", "of", "the", "String", "is", "30", ".", "If", "the", "size", "exceeds", "the", "maximum", "size", "the", "String", "will", "be", "truncated", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java#L310-L320
150,618
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java
ID3v1Tag.setYear
public void setYear(String newYear) { if (newYear.length() > YEAR_SIZE) { year = newYear.substring(0, YEAR_SIZE); } else { year = newYear; } }
java
public void setYear(String newYear) { if (newYear.length() > YEAR_SIZE) { year = newYear.substring(0, YEAR_SIZE); } else { year = newYear; } }
[ "public", "void", "setYear", "(", "String", "newYear", ")", "{", "if", "(", "newYear", ".", "length", "(", ")", ">", "YEAR_SIZE", ")", "{", "year", "=", "newYear", ".", "substring", "(", "0", ",", "YEAR_SIZE", ")", ";", "}", "else", "{", "year", "=...
Set the year field of the tag. The maximum size of the String is 4. If the size exceeds the maximum size, the String will be truncated. @param newYear the year for the tag
[ "Set", "the", "year", "field", "of", "the", "tag", ".", "The", "maximum", "size", "of", "the", "String", "is", "4", ".", "If", "the", "size", "exceeds", "the", "maximum", "size", "the", "String", "will", "be", "truncated", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java#L338-L348
150,619
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java
ID3v1Tag.setComment
public void setComment(String newComment) { if (comment.length() > COMMENT_SIZE) { comment = newComment.substring(0, COMMENT_SIZE); } else { comment = newComment; } }
java
public void setComment(String newComment) { if (comment.length() > COMMENT_SIZE) { comment = newComment.substring(0, COMMENT_SIZE); } else { comment = newComment; } }
[ "public", "void", "setComment", "(", "String", "newComment", ")", "{", "if", "(", "comment", ".", "length", "(", ")", ">", "COMMENT_SIZE", ")", "{", "comment", "=", "newComment", ".", "substring", "(", "0", ",", "COMMENT_SIZE", ")", ";", "}", "else", "...
Set the comment field of the tag. The maximum size of the String is 30. If the size exceeds the maximum size, the String will be truncated. @param newComment the comment of the tag
[ "Set", "the", "comment", "field", "of", "the", "tag", ".", "The", "maximum", "size", "of", "the", "String", "is", "30", ".", "If", "the", "size", "exceeds", "the", "maximum", "size", "the", "String", "will", "be", "truncated", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java#L366-L376
150,620
jtrfp/javamod
src/main/java/de/quippy/jflac/frame/EntropyPartitionedRiceContents.java
EntropyPartitionedRiceContents.ensureSize
public void ensureSize(int maxPartitionOrder) { if (capacityByOrder >= maxPartitionOrder) return; parameters = new int[(1 << maxPartitionOrder)]; rawBits = new int[(1 << maxPartitionOrder)]; capacityByOrder = maxPartitionOrder; }
java
public void ensureSize(int maxPartitionOrder) { if (capacityByOrder >= maxPartitionOrder) return; parameters = new int[(1 << maxPartitionOrder)]; rawBits = new int[(1 << maxPartitionOrder)]; capacityByOrder = maxPartitionOrder; }
[ "public", "void", "ensureSize", "(", "int", "maxPartitionOrder", ")", "{", "if", "(", "capacityByOrder", ">=", "maxPartitionOrder", ")", "return", ";", "parameters", "=", "new", "int", "[", "(", "1", "<<", "maxPartitionOrder", ")", "]", ";", "rawBits", "=", ...
Ensure enough menory has been allocated. @param maxPartitionOrder The maximum partition order
[ "Ensure", "enough", "menory", "has", "been", "allocated", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/frame/EntropyPartitionedRiceContents.java#L38-L43
150,621
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_lusol.java
Scs_lusol.cs_lusol
public static boolean cs_lusol(int order, Scs A, float[] b, float tol) { float[] x; Scss S; Scsn N; int n; boolean ok; if (!Scs_util.CS_CSC(A) || b == null) return (false); /* check inputs */ n = A.n; S = Scs_sqr.cs_sqr(order, A, false...
java
public static boolean cs_lusol(int order, Scs A, float[] b, float tol) { float[] x; Scss S; Scsn N; int n; boolean ok; if (!Scs_util.CS_CSC(A) || b == null) return (false); /* check inputs */ n = A.n; S = Scs_sqr.cs_sqr(order, A, false...
[ "public", "static", "boolean", "cs_lusol", "(", "int", "order", ",", "Scs", "A", ",", "float", "[", "]", "b", ",", "float", "tol", ")", "{", "float", "[", "]", "x", ";", "Scss", "S", ";", "Scsn", "N", ";", "int", "n", ";", "boolean", "ok", ";",...
Solves Ax=b, where A is square and nonsingular. b overwritten with solution. Partial pivoting if tol = 1.f @param order ordering method to use (0 to 3) @param A column-compressed matrix @param b size n, b on input, x on output @param tol partial pivoting tolerance @return true if successful, false on error
[ "Solves", "Ax", "=", "b", "where", "A", "is", "square", "and", "nonsingular", ".", "b", "overwritten", "with", "solution", ".", "Partial", "pivoting", "if", "tol", "=", "1", ".", "f" ]
6a6f66bccce1558156a961494358952603b0ac84
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_lusol.java#L53-L73
150,622
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/util/PathPattern.java
PathPattern.matches
public static boolean matches(Collection<PathPattern> patterns, List<String> path) { for (PathPattern pattern : patterns) if (pattern.matches(path)) return true; return false; }
java
public static boolean matches(Collection<PathPattern> patterns, List<String> path) { for (PathPattern pattern : patterns) if (pattern.matches(path)) return true; return false; }
[ "public", "static", "boolean", "matches", "(", "Collection", "<", "PathPattern", ">", "patterns", ",", "List", "<", "String", ">", "path", ")", "{", "for", "(", "PathPattern", "pattern", ":", "patterns", ")", "if", "(", "pattern", ".", "matches", "(", "p...
Return true if the given path elements match at least one of the given pattern.
[ "Return", "true", "if", "the", "given", "path", "elements", "match", "at", "least", "one", "of", "the", "given", "pattern", "." ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/util/PathPattern.java#L103-L108
150,623
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/io/IOAsOutputStream.java
IOAsOutputStream.get
public static OutputStream get(IO.Writable io) { if (io instanceof IOFromOutputStream) return ((IOFromOutputStream)io).getOutputStream(); if (io instanceof IO.WritableByteStream) return new ByteStream((IO.WritableByteStream)io); return new Writable(io); }
java
public static OutputStream get(IO.Writable io) { if (io instanceof IOFromOutputStream) return ((IOFromOutputStream)io).getOutputStream(); if (io instanceof IO.WritableByteStream) return new ByteStream((IO.WritableByteStream)io); return new Writable(io); }
[ "public", "static", "OutputStream", "get", "(", "IO", ".", "Writable", "io", ")", "{", "if", "(", "io", "instanceof", "IOFromOutputStream", ")", "return", "(", "(", "IOFromOutputStream", ")", "io", ")", ".", "getOutputStream", "(", ")", ";", "if", "(", "...
Create an OutputStream based on the given writable IO.
[ "Create", "an", "OutputStream", "based", "on", "the", "given", "writable", "IO", "." ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/IOAsOutputStream.java#L13-L19
150,624
livetribe/livetribe-slp
osgi/bundle/src/main/java/org/livetribe/slp/osgi/ServiceAgentManagedService.java
ServiceAgentManagedService.close
public void close() { LOGGER.entering(CLASS_NAME, "close"); synchronized (lock) { if (serviceAgent != null) { serviceRegistration.unregister(); if (LOGGER.isLoggable(Level.FINER)) LOGGER.finer("Service Agent " + this + " stopping...")...
java
public void close() { LOGGER.entering(CLASS_NAME, "close"); synchronized (lock) { if (serviceAgent != null) { serviceRegistration.unregister(); if (LOGGER.isLoggable(Level.FINER)) LOGGER.finer("Service Agent " + this + " stopping...")...
[ "public", "void", "close", "(", ")", "{", "LOGGER", ".", "entering", "(", "CLASS_NAME", ",", "\"close\"", ")", ";", "synchronized", "(", "lock", ")", "{", "if", "(", "serviceAgent", "!=", "null", ")", "{", "serviceRegistration", ".", "unregister", "(", "...
Shuts down the user agent if one exists.
[ "Shuts", "down", "the", "user", "agent", "if", "one", "exists", "." ]
6cc13dbe81feab133fe3dd291ca081cbc6e1f591
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/osgi/bundle/src/main/java/org/livetribe/slp/osgi/ServiceAgentManagedService.java#L131-L150
150,625
hawkular/hawkular-inventory
hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/TinkerpopBackend.java
TinkerpopBackend.checkProperties
static void checkProperties(Map<String, Object> properties, String[] disallowedProperties) { if (properties == null || properties.isEmpty()) { return; } HashSet<String> disallowed = new HashSet<>(properties.keySet()); disallowed.retainAll(Arrays.asList(disallowedProperties))...
java
static void checkProperties(Map<String, Object> properties, String[] disallowedProperties) { if (properties == null || properties.isEmpty()) { return; } HashSet<String> disallowed = new HashSet<>(properties.keySet()); disallowed.retainAll(Arrays.asList(disallowedProperties))...
[ "static", "void", "checkProperties", "(", "Map", "<", "String", ",", "Object", ">", "properties", ",", "String", "[", "]", "disallowedProperties", ")", "{", "if", "(", "properties", "==", "null", "||", "properties", ".", "isEmpty", "(", ")", ")", "{", "r...
If the properties map contains a key from the disallowed properties, throw an exception. @param properties the properties to check @param disallowedProperties the list of property names that cannot appear in the provided map @throws IllegalArgumentException if the map contains one or more disallowed keys
[ "If", "the", "properties", "map", "contains", "a", "key", "from", "the", "disallowed", "properties", "throw", "an", "exception", "." ]
f56dc10323dca21777feb5b609a9e9cc70ffaf62
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/TinkerpopBackend.java#L1268-L1280
150,626
hawkular/hawkular-inventory
hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/TinkerpopBackend.java
TinkerpopBackend.updateProperties
static void updateProperties(Element e, Map<String, Object> properties, String[] disallowedProperties) { if (properties == null) { return; } Set<String> disallowed = new HashSet<>(Arrays.asList(disallowedProperties)); //remove all non-mapped properties, that are not in the ...
java
static void updateProperties(Element e, Map<String, Object> properties, String[] disallowedProperties) { if (properties == null) { return; } Set<String> disallowed = new HashSet<>(Arrays.asList(disallowedProperties)); //remove all non-mapped properties, that are not in the ...
[ "static", "void", "updateProperties", "(", "Element", "e", ",", "Map", "<", "String", ",", "Object", ">", "properties", ",", "String", "[", "]", "disallowedProperties", ")", "{", "if", "(", "properties", "==", "null", ")", "{", "return", ";", "}", "Set",...
Updates the properties of the element, disregarding any changes of the disallowed properties <p> The list of the disallowed properties will usually come from {@link Constants.Type#getMappedProperties()}. @param e the element to update properties of @param properties the properties to upda...
[ "Updates", "the", "properties", "of", "the", "element", "disregarding", "any", "changes", "of", "the", "disallowed", "properties" ]
f56dc10323dca21777feb5b609a9e9cc70ffaf62
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/TinkerpopBackend.java#L1292-L1316
150,627
hawkular/hawkular-inventory
hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/TinkerpopBackend.java
TinkerpopBackend.getType
static Constants.Type getType(Vertex v) { return Constants.Type.valueOf((String) v.property(__type.name()).value()); }
java
static Constants.Type getType(Vertex v) { return Constants.Type.valueOf((String) v.property(__type.name()).value()); }
[ "static", "Constants", ".", "Type", "getType", "(", "Vertex", "v", ")", "{", "return", "Constants", ".", "Type", ".", "valueOf", "(", "(", "String", ")", "v", ".", "property", "(", "__type", ".", "name", "(", ")", ")", ".", "value", "(", ")", ")", ...
Gets the type of the entity that the provided vertex represents.
[ "Gets", "the", "type", "of", "the", "entity", "that", "the", "provided", "vertex", "represents", "." ]
f56dc10323dca21777feb5b609a9e9cc70ffaf62
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/TinkerpopBackend.java#L1321-L1323
150,628
WinRoad-NET/wrdocletbase
src/main/java/net/winroad/wrdoclet/utils/UniversalNamespaceCache.java
UniversalNamespaceCache.examineNode
private void examineNode(Node node, boolean attributesOnly) { while(node != null && node.getNodeType() == Node.COMMENT_NODE) { node = node.getNextSibling(); } if(node != null) { NamedNodeMap attributes = node.getAttributes(); if(attributes != null) { for (int i = 0; i < attributes.getLength(); i++) {...
java
private void examineNode(Node node, boolean attributesOnly) { while(node != null && node.getNodeType() == Node.COMMENT_NODE) { node = node.getNextSibling(); } if(node != null) { NamedNodeMap attributes = node.getAttributes(); if(attributes != null) { for (int i = 0; i < attributes.getLength(); i++) {...
[ "private", "void", "examineNode", "(", "Node", "node", ",", "boolean", "attributesOnly", ")", "{", "while", "(", "node", "!=", "null", "&&", "node", ".", "getNodeType", "(", ")", "==", "Node", ".", "COMMENT_NODE", ")", "{", "node", "=", "node", ".", "g...
A single node is read, the namespace attributes are extracted and stored. @param node to examine @param attributesOnly, if true no recursion happens
[ "A", "single", "node", "is", "read", "the", "namespace", "attributes", "are", "extracted", "and", "stored", "." ]
3c8386a7957a76c3f10a07d114052158976e22c7
https://github.com/WinRoad-NET/wrdocletbase/blob/3c8386a7957a76c3f10a07d114052158976e22c7/src/main/java/net/winroad/wrdoclet/utils/UniversalNamespaceCache.java#L47-L69
150,629
jpaoletti/java-presentation-manager
modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/converter/CollectionConverter.java
CollectionConverter.getEntity
protected Entity getEntity() throws ConverterException { final String _entity = getConfig("entity"); if (_entity == null) { throw new ConverterException("collection.converter.entity.cannot.be.null"); } final Entity entity = PresentationManager.getPm().getEntity(_entity); ...
java
protected Entity getEntity() throws ConverterException { final String _entity = getConfig("entity"); if (_entity == null) { throw new ConverterException("collection.converter.entity.cannot.be.null"); } final Entity entity = PresentationManager.getPm().getEntity(_entity); ...
[ "protected", "Entity", "getEntity", "(", ")", "throws", "ConverterException", "{", "final", "String", "_entity", "=", "getConfig", "(", "\"entity\"", ")", ";", "if", "(", "_entity", "==", "null", ")", "{", "throw", "new", "ConverterException", "(", "\"collecti...
Getter for entity property. Must be defined. @return the entity
[ "Getter", "for", "entity", "property", ".", "Must", "be", "defined", "." ]
d5aab55638383695db244744b4bfe27c5200e04f
https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/converter/CollectionConverter.java#L100-L110
150,630
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java
GeneralStorable.getValueAsFloat
public float getValueAsFloat(String field) throws IOException { int hash = Arrays.hashCode(field.getBytes()); return getValueAsFloat(structure.valueHash2Index.get(hash)); }
java
public float getValueAsFloat(String field) throws IOException { int hash = Arrays.hashCode(field.getBytes()); return getValueAsFloat(structure.valueHash2Index.get(hash)); }
[ "public", "float", "getValueAsFloat", "(", "String", "field", ")", "throws", "IOException", "{", "int", "hash", "=", "Arrays", ".", "hashCode", "(", "field", ".", "getBytes", "(", ")", ")", ";", "return", "getValueAsFloat", "(", "structure", ".", "valueHash2...
Returns the value belonging to the given field as int @param field the name of the field @return the requested value @throws IOException
[ "Returns", "the", "value", "belonging", "to", "the", "given", "field", "as", "int" ]
a670f17a2186c9a15725f26617d77ce8e444e072
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java#L382-L385
150,631
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java
GeneralStorable.getValueAsChar
public char getValueAsChar(int index) throws IOException { if (index >= structure.valueSizes.size()) { throw new IOException("Index " + index + " is out of range."); } return Bytes.toChar(value, structure.valueByteOffsets.get(index)); }
java
public char getValueAsChar(int index) throws IOException { if (index >= structure.valueSizes.size()) { throw new IOException("Index " + index + " is out of range."); } return Bytes.toChar(value, structure.valueByteOffsets.get(index)); }
[ "public", "char", "getValueAsChar", "(", "int", "index", ")", "throws", "IOException", "{", "if", "(", "index", ">=", "structure", ".", "valueSizes", ".", "size", "(", ")", ")", "{", "throw", "new", "IOException", "(", "\"Index \"", "+", "index", "+", "\...
Returns the value belonging to the given field as char @param index the index of the requested field @return the requested value @throws IOException
[ "Returns", "the", "value", "belonging", "to", "the", "given", "field", "as", "char" ]
a670f17a2186c9a15725f26617d77ce8e444e072
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java#L466-L471
150,632
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java
GeneralStorable.getValueAsByte
public byte getValueAsByte(int index) throws IOException { if (index >= structure.valueSizes.size()) { throw new IOException("Index " + index + " is out of range."); } return value[index]; }
java
public byte getValueAsByte(int index) throws IOException { if (index >= structure.valueSizes.size()) { throw new IOException("Index " + index + " is out of range."); } return value[index]; }
[ "public", "byte", "getValueAsByte", "(", "int", "index", ")", "throws", "IOException", "{", "if", "(", "index", ">=", "structure", ".", "valueSizes", ".", "size", "(", ")", ")", "{", "throw", "new", "IOException", "(", "\"Index \"", "+", "index", "+", "\...
Returns the value belonging to the given field as byte @param index the index of the requested field @return the requested value @throws IOException
[ "Returns", "the", "value", "belonging", "to", "the", "given", "field", "as", "byte" ]
a670f17a2186c9a15725f26617d77ce8e444e072
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java#L507-L512
150,633
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java
GeneralStorable.getKeyAsChar
public char getKeyAsChar(int index) throws IOException { if (index >= structure.keySizes.size()) { throw new IOException("Index " + index + " is out of range."); } return Bytes.toChar(key, structure.keyByteOffsets.get(index)); }
java
public char getKeyAsChar(int index) throws IOException { if (index >= structure.keySizes.size()) { throw new IOException("Index " + index + " is out of range."); } return Bytes.toChar(key, structure.keyByteOffsets.get(index)); }
[ "public", "char", "getKeyAsChar", "(", "int", "index", ")", "throws", "IOException", "{", "if", "(", "index", ">=", "structure", ".", "keySizes", ".", "size", "(", ")", ")", "{", "throw", "new", "IOException", "(", "\"Index \"", "+", "index", "+", "\" is...
Returns the key belonging to the given field as char @param index the index of the requested field @return the requested value @throws IOException
[ "Returns", "the", "key", "belonging", "to", "the", "given", "field", "as", "char" ]
a670f17a2186c9a15725f26617d77ce8e444e072
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java#L898-L904
150,634
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java
GeneralStorable.getKeyAsByte
public byte getKeyAsByte(int index) throws IOException { if (index >= structure.keySizes.size()) { throw new IOException("Index " + index + " is out of range."); } return key[structure.keyByteOffsets.get(index)]; }
java
public byte getKeyAsByte(int index) throws IOException { if (index >= structure.keySizes.size()) { throw new IOException("Index " + index + " is out of range."); } return key[structure.keyByteOffsets.get(index)]; }
[ "public", "byte", "getKeyAsByte", "(", "int", "index", ")", "throws", "IOException", "{", "if", "(", "index", ">=", "structure", ".", "keySizes", ".", "size", "(", ")", ")", "{", "throw", "new", "IOException", "(", "\"Index \"", "+", "index", "+", "\" is...
Returns the key belonging to the given field as byte @param index the index of the requested field @return the requested value @throws IOException
[ "Returns", "the", "key", "belonging", "to", "the", "given", "field", "as", "byte" ]
a670f17a2186c9a15725f26617d77ce8e444e072
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java#L927-L932
150,635
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/sync/synchronizer/Synchronizer.java
Synchronizer.writeBuffer
private void writeBuffer() throws IOException { bufferedWriter.flip(); // position is set to zero in dataFile.write dataFile.write(writeOffset, bufferedWriter); writeOffset += bufferedWriter.limit(); bufferedWriter.clear(); readNextChunkFromFile(); // before overwriting the ...
java
private void writeBuffer() throws IOException { bufferedWriter.flip(); // position is set to zero in dataFile.write dataFile.write(writeOffset, bufferedWriter); writeOffset += bufferedWriter.limit(); bufferedWriter.clear(); readNextChunkFromFile(); // before overwriting the ...
[ "private", "void", "writeBuffer", "(", ")", "throws", "IOException", "{", "bufferedWriter", ".", "flip", "(", ")", ";", "// position is set to zero in dataFile.write\r", "dataFile", ".", "write", "(", "writeOffset", ",", "bufferedWriter", ")", ";", "writeOffset", "+...
writes the remaining bytes in bufferedWriter to the given FileChannel @param FileChannel @throws IOException
[ "writes", "the", "remaining", "bytes", "in", "bufferedWriter", "to", "the", "given", "FileChannel" ]
a670f17a2186c9a15725f26617d77ce8e444e072
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/sync/synchronizer/Synchronizer.java#L260-L266
150,636
MythTV-Clients/MythTV-Service-API
src/main/java/org/mythtv/services/api/ServerVersionQuery.java
ServerVersionQuery.getMythVersion
public static ApiVersion getMythVersion(String baseUri, long connectTimeout, TimeUnit timeUnit) throws IOException { OkHttpClient client = new OkHttpClient(); client.setConnectTimeout(connectTimeout, timeUnit); return getMythVersion(baseUri, client); }
java
public static ApiVersion getMythVersion(String baseUri, long connectTimeout, TimeUnit timeUnit) throws IOException { OkHttpClient client = new OkHttpClient(); client.setConnectTimeout(connectTimeout, timeUnit); return getMythVersion(baseUri, client); }
[ "public", "static", "ApiVersion", "getMythVersion", "(", "String", "baseUri", ",", "long", "connectTimeout", ",", "TimeUnit", "timeUnit", ")", "throws", "IOException", "{", "OkHttpClient", "client", "=", "new", "OkHttpClient", "(", ")", ";", "client", ".", "setC...
Gets the api version of the given backend @param baseUri the backend services api url @param connectTimeout connection timeout @param timeUnit connection timeout unit @return the Api version @throws IOException if an error occurs
[ "Gets", "the", "api", "version", "of", "the", "given", "backend" ]
7951954f767515550738f1b064d6c97099e6df15
https://github.com/MythTV-Clients/MythTV-Service-API/blob/7951954f767515550738f1b064d6c97099e6df15/src/main/java/org/mythtv/services/api/ServerVersionQuery.java#L43-L47
150,637
MythTV-Clients/MythTV-Service-API
src/main/java/org/mythtv/services/api/ServerVersionQuery.java
ServerVersionQuery.isServerReachable
public static boolean isServerReachable(String baseUrl, long connectTimeout, TimeUnit timeUnit) throws IOException { OkHttpClient client = new OkHttpClient(); client.setConnectTimeout(connectTimeout, timeUnit); return isServerReachable(baseUrl, client); }
java
public static boolean isServerReachable(String baseUrl, long connectTimeout, TimeUnit timeUnit) throws IOException { OkHttpClient client = new OkHttpClient(); client.setConnectTimeout(connectTimeout, timeUnit); return isServerReachable(baseUrl, client); }
[ "public", "static", "boolean", "isServerReachable", "(", "String", "baseUrl", ",", "long", "connectTimeout", ",", "TimeUnit", "timeUnit", ")", "throws", "IOException", "{", "OkHttpClient", "client", "=", "new", "OkHttpClient", "(", ")", ";", "client", ".", "setC...
Check if the server is reachable @param baseUrl The url of the server to test @param connectTimeout connection timeout @param timeUnit connection timeout unit @return true if reachable otherwise false. @throws IOException if an error occurs
[ "Check", "if", "the", "server", "is", "reachable" ]
7951954f767515550738f1b064d6c97099e6df15
https://github.com/MythTV-Clients/MythTV-Service-API/blob/7951954f767515550738f1b064d6c97099e6df15/src/main/java/org/mythtv/services/api/ServerVersionQuery.java#L110-L114
150,638
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java
ID3v2ExtendedHeader.readExtendedHeader
private void readExtendedHeader(RandomAccessInputStream raf) throws IOException, ID3v2FormatException { raf.seek(EXT_HEAD_LOCATION); byte[] buf = new byte[4]; if (raf.read(buf) != buf.length) { throw new IOException("Error reading extended header:size"); } size = Helpers.convertDWordToInt(buf, 0); i...
java
private void readExtendedHeader(RandomAccessInputStream raf) throws IOException, ID3v2FormatException { raf.seek(EXT_HEAD_LOCATION); byte[] buf = new byte[4]; if (raf.read(buf) != buf.length) { throw new IOException("Error reading extended header:size"); } size = Helpers.convertDWordToInt(buf, 0); i...
[ "private", "void", "readExtendedHeader", "(", "RandomAccessInputStream", "raf", ")", "throws", "IOException", ",", "ID3v2FormatException", "{", "raf", ".", "seek", "(", "EXT_HEAD_LOCATION", ")", ";", "byte", "[", "]", "buf", "=", "new", "byte", "[", "4", "]", ...
Read the information in the file's extended header @exception FileNotFoundException if an error occurs @exception IOException if an error occurs @exception ID3v2FormatException if an error occurs
[ "Read", "the", "information", "in", "the", "file", "s", "extended", "header" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java#L92-L116
150,639
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java
ID3v2ExtendedHeader.parseFlags
private void parseFlags(byte[] flags) throws ID3v2FormatException { int bytesRead = 1; update = (flags[0]&0x80)!=0; if (update) bytesRead++; crced = (flags[0]&0x40)!=0; if (crced) { bytesRead++; for (int i = 0; i < crc.length; i++) crc[i] = flags[bytesRead++]; } if ((flags[0]&0x80)!=0) {...
java
private void parseFlags(byte[] flags) throws ID3v2FormatException { int bytesRead = 1; update = (flags[0]&0x80)!=0; if (update) bytesRead++; crced = (flags[0]&0x40)!=0; if (crced) { bytesRead++; for (int i = 0; i < crc.length; i++) crc[i] = flags[bytesRead++]; } if ((flags[0]&0x80)!=0) {...
[ "private", "void", "parseFlags", "(", "byte", "[", "]", "flags", ")", "throws", "ID3v2FormatException", "{", "int", "bytesRead", "=", "1", ";", "update", "=", "(", "flags", "[", "0", "]", "&", "0x80", ")", "!=", "0", ";", "if", "(", "update", ")", ...
Parse the extended header flag bytes @param flags the array of extended flags @exception ID3v2FormatException if an error occurs
[ "Parse", "the", "extended", "header", "flag", "bytes" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java#L124-L153
150,640
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java
ID3v2ExtendedHeader.getFlagBytes
private byte[] getFlagBytes() { byte[] b = new byte[numFlagBytes]; int bytesCopied = 1; b[0] = 0; if (update) { b[0] |= 0x80; b[bytesCopied++] = 0; } if (crced) { b[0] |= 0x40; b[bytesCopied++] = (byte) crc.length; System.arraycopy(crc, 0, b, bytesCopied, crc.length); bytesCopied += ...
java
private byte[] getFlagBytes() { byte[] b = new byte[numFlagBytes]; int bytesCopied = 1; b[0] = 0; if (update) { b[0] |= 0x80; b[bytesCopied++] = 0; } if (crced) { b[0] |= 0x40; b[bytesCopied++] = (byte) crc.length; System.arraycopy(crc, 0, b, bytesCopied, crc.length); bytesCopied += ...
[ "private", "byte", "[", "]", "getFlagBytes", "(", ")", "{", "byte", "[", "]", "b", "=", "new", "byte", "[", "numFlagBytes", "]", ";", "int", "bytesCopied", "=", "1", ";", "b", "[", "0", "]", "=", "0", ";", "if", "(", "update", ")", "{", "b", ...
A helper function for the getBytes method that returns a byte array representing the extended flags field of the extended header. @return the extended flags field of the extended header
[ "A", "helper", "function", "for", "the", "getBytes", "method", "that", "returns", "a", "byte", "array", "representing", "the", "extended", "flags", "field", "of", "the", "extended", "header", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java#L160-L192
150,641
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java
ID3v2ExtendedHeader.getBytes
public byte[] getBytes() { byte[] b = new byte[size]; int bytesCopied = 0; System.arraycopy(Helpers.convertIntToDWord(size), 0, b, bytesCopied, 4); bytesCopied += 4; b[bytesCopied++] = (byte) numFlagBytes; System.arraycopy(getFlagBytes(), 0, b, bytesCopied, numFlagBytes); bytesCopied += numFlagBytes; ...
java
public byte[] getBytes() { byte[] b = new byte[size]; int bytesCopied = 0; System.arraycopy(Helpers.convertIntToDWord(size), 0, b, bytesCopied, 4); bytesCopied += 4; b[bytesCopied++] = (byte) numFlagBytes; System.arraycopy(getFlagBytes(), 0, b, bytesCopied, numFlagBytes); bytesCopied += numFlagBytes; ...
[ "public", "byte", "[", "]", "getBytes", "(", ")", "{", "byte", "[", "]", "b", "=", "new", "byte", "[", "size", "]", ";", "int", "bytesCopied", "=", "0", ";", "System", ".", "arraycopy", "(", "Helpers", ".", "convertIntToDWord", "(", "size", ")", ",...
Return an array of bytes representing this extended header in the standard format to be written to a file. @return a binary represenation of this extended header
[ "Return", "an", "array", "of", "bytes", "representing", "this", "extended", "header", "in", "the", "standard", "format", "to", "be", "written", "to", "a", "file", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java#L200-L212
150,642
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java
ID3v2ExtendedHeader.getMaxFrames
public int getMaxFrames() { int retval = -1; if ((maxTagSize >= 0) && (maxTagSize < MAX_TAG_FRAMES_TABLE.length)) { retval = MAX_TAG_FRAMES_TABLE[maxTagSize]; } return retval; }
java
public int getMaxFrames() { int retval = -1; if ((maxTagSize >= 0) && (maxTagSize < MAX_TAG_FRAMES_TABLE.length)) { retval = MAX_TAG_FRAMES_TABLE[maxTagSize]; } return retval; }
[ "public", "int", "getMaxFrames", "(", ")", "{", "int", "retval", "=", "-", "1", ";", "if", "(", "(", "maxTagSize", ">=", "0", ")", "&&", "(", "maxTagSize", "<", "MAX_TAG_FRAMES_TABLE", ".", "length", ")", ")", "{", "retval", "=", "MAX_TAG_FRAMES_TABLE", ...
Returns the maximum number of frames if set. If unset, returns -1 @return the maximum number of frames or -1 if unset
[ "Returns", "the", "maximum", "number", "of", "frames", "if", "set", ".", "If", "unset", "returns", "-", "1" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java#L239-L249
150,643
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java
ID3v2ExtendedHeader.getMaxTagSize
public int getMaxTagSize() { int retval = -1; if ((maxTagSize >= 0) && (maxTagSize < MAX_TAG_SIZE_TABLE.length)) { retval = MAX_TAG_SIZE_TABLE[maxTagSize]; } return retval; }
java
public int getMaxTagSize() { int retval = -1; if ((maxTagSize >= 0) && (maxTagSize < MAX_TAG_SIZE_TABLE.length)) { retval = MAX_TAG_SIZE_TABLE[maxTagSize]; } return retval; }
[ "public", "int", "getMaxTagSize", "(", ")", "{", "int", "retval", "=", "-", "1", ";", "if", "(", "(", "maxTagSize", ">=", "0", ")", "&&", "(", "maxTagSize", "<", "MAX_TAG_SIZE_TABLE", ".", "length", ")", ")", "{", "retval", "=", "MAX_TAG_SIZE_TABLE", "...
Returns the maximum tag size or -1 if unset @return the maximum tag size or -1 if unset
[ "Returns", "the", "maximum", "tag", "size", "or", "-", "1", "if", "unset" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java#L256-L266
150,644
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java
ID3v2ExtendedHeader.getMaxTextSize
public int getMaxTextSize() { int retval = -1; if ((maxTextSize >= 0) && (maxTextSize < MAX_TEXT_SIZE_TABLE.length)) { retval = MAX_TEXT_SIZE_TABLE[maxTextSize]; } return retval; }
java
public int getMaxTextSize() { int retval = -1; if ((maxTextSize >= 0) && (maxTextSize < MAX_TEXT_SIZE_TABLE.length)) { retval = MAX_TEXT_SIZE_TABLE[maxTextSize]; } return retval; }
[ "public", "int", "getMaxTextSize", "(", ")", "{", "int", "retval", "=", "-", "1", ";", "if", "(", "(", "maxTextSize", ">=", "0", ")", "&&", "(", "maxTextSize", "<", "MAX_TEXT_SIZE_TABLE", ".", "length", ")", ")", "{", "retval", "=", "MAX_TEXT_SIZE_TABLE"...
Returns the maximum length of a string if set or -1 @return the maximum length of a string if set or -1
[ "Returns", "the", "maximum", "length", "of", "a", "string", "if", "set", "or", "-", "1" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2ExtendedHeader.java#L283-L293
150,645
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/info/SimpleDirectoryScanner.java
SimpleDirectoryScanner.clear
public void clear(){ this.errors.clearErrorMessages();; this.warnings.clear(); this.infos.clear(); this.scDir = 0; this.scDirUnreadable = 0; this.scFiles = 0; this.scFilesUnreadable = 0; }
java
public void clear(){ this.errors.clearErrorMessages();; this.warnings.clear(); this.infos.clear(); this.scDir = 0; this.scDirUnreadable = 0; this.scFiles = 0; this.scFilesUnreadable = 0; }
[ "public", "void", "clear", "(", ")", "{", "this", ".", "errors", ".", "clearErrorMessages", "(", ")", ";", ";", "this", ".", "warnings", ".", "clear", "(", ")", ";", "this", ".", "infos", ".", "clear", "(", ")", ";", "this", ".", "scDir", "=", "0...
Clears errors and warnings, automatically called for new scans.
[ "Clears", "errors", "and", "warnings", "automatically", "called", "for", "new", "scans", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/info/SimpleDirectoryScanner.java#L69-L79
150,646
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/info/SimpleDirectoryScanner.java
SimpleDirectoryScanner.doInfo
void doInfo(){ this.infos.add("scanned directories: " + this.scDir); this.infos.add("unreadable directories: " + this.scDirUnreadable); this.infos.add("found files: " + this.scFiles); this.infos.add("unreadable files: " + this.scFilesUnreadable); }
java
void doInfo(){ this.infos.add("scanned directories: " + this.scDir); this.infos.add("unreadable directories: " + this.scDirUnreadable); this.infos.add("found files: " + this.scFiles); this.infos.add("unreadable files: " + this.scFilesUnreadable); }
[ "void", "doInfo", "(", ")", "{", "this", ".", "infos", ".", "add", "(", "\"scanned directories: \"", "+", "this", ".", "scDir", ")", ";", "this", ".", "infos", ".", "add", "(", "\"unreadable directories: \"", "+", "this", ".", "scDirUnreadable", ")", ";...
Generate a few strings with collected information about the scan.
[ "Generate", "a", "few", "strings", "with", "collected", "information", "about", "the", "scan", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/info/SimpleDirectoryScanner.java#L98-L104
150,647
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/info/SimpleDirectoryScanner.java
SimpleDirectoryScanner.doScan
protected List<FileSource> doScan(File fDir){ List<FileSource> ret = new ArrayList<>(); if(fDir!=null && fDir.exists() && !fDir.isHidden()){ for(final File entry : fDir.listFiles()) { if(entry.isHidden()){ continue; } if(!entry.isDirectory()) { this.scFiles++; if(entry.canRead...
java
protected List<FileSource> doScan(File fDir){ List<FileSource> ret = new ArrayList<>(); if(fDir!=null && fDir.exists() && !fDir.isHidden()){ for(final File entry : fDir.listFiles()) { if(entry.isHidden()){ continue; } if(!entry.isDirectory()) { this.scFiles++; if(entry.canRead...
[ "protected", "List", "<", "FileSource", ">", "doScan", "(", "File", "fDir", ")", "{", "List", "<", "FileSource", ">", "ret", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", "(", "fDir", "!=", "null", "&&", "fDir", ".", "exists", "(", ")", "&&",...
Does the actual scan of a directory. @param fDir starting directory @return set of found and readable files, empty set of none found
[ "Does", "the", "actual", "scan", "of", "a", "directory", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/info/SimpleDirectoryScanner.java#L111-L141
150,648
jtrfp/javamod
src/main/java/de/quippy/jflac/io/BitOutputStream.java
BitOutputStream.concatenateAligned
public boolean concatenateAligned(BitOutputStream src) { int bitsToAdd = src.totalBits - src.totalConsumedBits; if (bitsToAdd == 0) return true; if (outBits != src.consumedBits) return false; if (!ensureSize(bitsToAdd)) return false; if (outBits == 0) { System.arrayco...
java
public boolean concatenateAligned(BitOutputStream src) { int bitsToAdd = src.totalBits - src.totalConsumedBits; if (bitsToAdd == 0) return true; if (outBits != src.consumedBits) return false; if (!ensureSize(bitsToAdd)) return false; if (outBits == 0) { System.arrayco...
[ "public", "boolean", "concatenateAligned", "(", "BitOutputStream", "src", ")", "{", "int", "bitsToAdd", "=", "src", ".", "totalBits", "-", "src", ".", "totalConsumedBits", ";", "if", "(", "bitsToAdd", "==", "0", ")", "return", "true", ";", "if", "(", "outB...
Concatinate one InputBitStream to the end of this one. @param src The inputBitStream to copy @return True if copy was successful
[ "Concatinate", "one", "InputBitStream", "to", "the", "end", "of", "this", "one", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/io/BitOutputStream.java#L162-L183
150,649
jtrfp/javamod
src/main/java/de/quippy/jflac/io/BitOutputStream.java
BitOutputStream.writeZeroes
public void writeZeroes(int bits) throws IOException { if (bits == 0) return; if (!ensureSize(bits)) throw new IOException("Memory Allocation Error"); totalBits += bits; while (bits > 0) { int n = Math.min(BITS_PER_BLURB - outBits, bits); buffer[outBlurbs] <<= n; ...
java
public void writeZeroes(int bits) throws IOException { if (bits == 0) return; if (!ensureSize(bits)) throw new IOException("Memory Allocation Error"); totalBits += bits; while (bits > 0) { int n = Math.min(BITS_PER_BLURB - outBits, bits); buffer[outBlurbs] <<= n; ...
[ "public", "void", "writeZeroes", "(", "int", "bits", ")", "throws", "IOException", "{", "if", "(", "bits", "==", "0", ")", "return", ";", "if", "(", "!", "ensureSize", "(", "bits", ")", ")", "throw", "new", "IOException", "(", "\"Memory Allocation Error\""...
Write zero bits. @param bits The number of zero bits to write @throws IOException On write error
[ "Write", "zero", "bits", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/io/BitOutputStream.java#L254-L268
150,650
jpaoletti/java-presentation-manager
modules/jpm-core/src/main/java/jpaoletti/jpm/validator/NotNull.java
NotNull.validate
@Override public ValidationResult validate(PMContext ctx) { final ValidationResult res = new ValidationResult(); final Object fieldvalue = ctx.getFieldValue(); res.setSuccessful(fieldvalue != null); if (!res.isSuccessful()) { res.getMessages().add(MessageFactory.error( ...
java
@Override public ValidationResult validate(PMContext ctx) { final ValidationResult res = new ValidationResult(); final Object fieldvalue = ctx.getFieldValue(); res.setSuccessful(fieldvalue != null); if (!res.isSuccessful()) { res.getMessages().add(MessageFactory.error( ...
[ "@", "Override", "public", "ValidationResult", "validate", "(", "PMContext", "ctx", ")", "{", "final", "ValidationResult", "res", "=", "new", "ValidationResult", "(", ")", ";", "final", "Object", "fieldvalue", "=", "ctx", ".", "getFieldValue", "(", ")", ";", ...
The validation method
[ "The", "validation", "method" ]
d5aab55638383695db244744b4bfe27c5200e04f
https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/validator/NotNull.java#L23-L35
150,651
satoshi-kimura/samurai-dao
src/main/java/ognl/DefaultMemberAccess.java
DefaultMemberAccess.isAccessible
public boolean isAccessible(Map context, Object target, Member member, String propertyName) { int modifiers = member.getModifiers(); boolean result = Modifier.isPublic(modifiers); if (!result) { if (Modifier.isPrivate(modifiers)) { result = getAllowPrivateAccess(); ...
java
public boolean isAccessible(Map context, Object target, Member member, String propertyName) { int modifiers = member.getModifiers(); boolean result = Modifier.isPublic(modifiers); if (!result) { if (Modifier.isPrivate(modifiers)) { result = getAllowPrivateAccess(); ...
[ "public", "boolean", "isAccessible", "(", "Map", "context", ",", "Object", "target", ",", "Member", "member", ",", "String", "propertyName", ")", "{", "int", "modifiers", "=", "member", ".", "getModifiers", "(", ")", ";", "boolean", "result", "=", "Modifier"...
Returns true if the given member is accessible or can be made accessible by this object.
[ "Returns", "true", "if", "the", "given", "member", "is", "accessible", "or", "can", "be", "made", "accessible", "by", "this", "object", "." ]
321729d8928f8e83eede6cb08e4bd7f7a24e9b94
https://github.com/satoshi-kimura/samurai-dao/blob/321729d8928f8e83eede6cb08e4bd7f7a24e9b94/src/main/java/ognl/DefaultMemberAccess.java#L133-L150
150,652
jtrfp/javamod
src/main/java/de/quippy/javamod/mixer/dsp/iir/filter/IIRFilterBase.java
IIRFilterBase.initialize
public void initialize(final int sampleRate, final int channels, final int frequency, final float parameter) { this.frequency = frequency; this.sampleRate = sampleRate; inArray = new float[channels][HISTORYSIZE]; outArray = new float[channels][HISTORYSIZE]; clearHistory(); }
java
public void initialize(final int sampleRate, final int channels, final int frequency, final float parameter) { this.frequency = frequency; this.sampleRate = sampleRate; inArray = new float[channels][HISTORYSIZE]; outArray = new float[channels][HISTORYSIZE]; clearHistory(); }
[ "public", "void", "initialize", "(", "final", "int", "sampleRate", ",", "final", "int", "channels", ",", "final", "int", "frequency", ",", "final", "float", "parameter", ")", "{", "this", ".", "frequency", "=", "frequency", ";", "this", ".", "sampleRate", ...
Call this to initialize. Will set the memory to 0 @since 09.01.2012
[ "Call", "this", "to", "initialize", ".", "Will", "set", "the", "memory", "to", "0" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/mixer/dsp/iir/filter/IIRFilterBase.java#L83-L90
150,653
jtrfp/javamod
src/main/java/de/quippy/javamod/mixer/dsp/iir/filter/IIRFilterBase.java
IIRFilterBase.clearHistory
public void clearHistory() { int channels = inArray.length; for (int c=0; c<channels; c++) { for (int i=0; i<HISTORYSIZE; i++) { inArray[c][i] = outArray[c][i] = 0f; } } }
java
public void clearHistory() { int channels = inArray.length; for (int c=0; c<channels; c++) { for (int i=0; i<HISTORYSIZE; i++) { inArray[c][i] = outArray[c][i] = 0f; } } }
[ "public", "void", "clearHistory", "(", ")", "{", "int", "channels", "=", "inArray", ".", "length", ";", "for", "(", "int", "c", "=", "0", ";", "c", "<", "channels", ";", "c", "++", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "H...
Clean the history @since 14.01.2012
[ "Clean", "the", "history" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/mixer/dsp/iir/filter/IIRFilterBase.java#L95-L105
150,654
jtrfp/javamod
src/main/java/de/quippy/mp3/decoder/Header.java
Header.calculate_framesize
public int calculate_framesize() { if (h_layer == 1) { framesize = (12 * bitrates[h_version][0][h_bitrate_index]) / frequencies[h_version][h_sample_frequency]; if (h_padding_bit != 0 ) framesize++; framesize <<= 2; // one slot is 4 bytes long nSlots = 0; } else { framesi...
java
public int calculate_framesize() { if (h_layer == 1) { framesize = (12 * bitrates[h_version][0][h_bitrate_index]) / frequencies[h_version][h_sample_frequency]; if (h_padding_bit != 0 ) framesize++; framesize <<= 2; // one slot is 4 bytes long nSlots = 0; } else { framesi...
[ "public", "int", "calculate_framesize", "(", ")", "{", "if", "(", "h_layer", "==", "1", ")", "{", "framesize", "=", "(", "12", "*", "bitrates", "[", "h_version", "]", "[", "0", "]", "[", "h_bitrate_index", "]", ")", "/", "frequencies", "[", "h_version"...
Calculate Frame size. Calculates framesize in bytes excluding header size.
[ "Calculate", "Frame", "size", ".", "Calculates", "framesize", "in", "bytes", "excluding", "header", "size", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/mp3/decoder/Header.java#L462-L502
150,655
jtrfp/javamod
src/main/java/de/quippy/jflac/FrameListeners.java
FrameListeners.processMetadata
public void processMetadata(Metadata metadata) { synchronized (frameListeners) { Iterator<FrameListener> it = frameListeners.iterator(); while (it.hasNext()) { FrameListener listener = it.next(); listener.processMetadata(metadata); } } ...
java
public void processMetadata(Metadata metadata) { synchronized (frameListeners) { Iterator<FrameListener> it = frameListeners.iterator(); while (it.hasNext()) { FrameListener listener = it.next(); listener.processMetadata(metadata); } } ...
[ "public", "void", "processMetadata", "(", "Metadata", "metadata", ")", "{", "synchronized", "(", "frameListeners", ")", "{", "Iterator", "<", "FrameListener", ">", "it", "=", "frameListeners", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext...
Process metadata records. @param metadata the metadata block @see de.quippy.jflac.FrameListener#processMetadata(de.quippy.jflac.metadata.MetadataBase)
[ "Process", "metadata", "records", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FrameListeners.java#L48-L56
150,656
jtrfp/javamod
src/main/java/de/quippy/jflac/FrameListeners.java
FrameListeners.processFrame
public void processFrame(Frame frame) { synchronized (frameListeners) { Iterator<FrameListener> it = frameListeners.iterator(); while (it.hasNext()) { FrameListener listener = it.next(); listener.processFrame(frame); } } }
java
public void processFrame(Frame frame) { synchronized (frameListeners) { Iterator<FrameListener> it = frameListeners.iterator(); while (it.hasNext()) { FrameListener listener = it.next(); listener.processFrame(frame); } } }
[ "public", "void", "processFrame", "(", "Frame", "frame", ")", "{", "synchronized", "(", "frameListeners", ")", "{", "Iterator", "<", "FrameListener", ">", "it", "=", "frameListeners", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(",...
Process data frames. @param frame the data frame @see de.quippy.jflac.FrameListener#processFrame(de.quippy.jflac.frame.Frame)
[ "Process", "data", "frames", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FrameListeners.java#L63-L71
150,657
jtrfp/javamod
src/main/java/de/quippy/jflac/FrameListeners.java
FrameListeners.processError
public void processError(String msg) { synchronized (frameListeners) { Iterator<FrameListener> it = frameListeners.iterator(); while (it.hasNext()) { FrameListener listener = it.next(); listener.processError(msg); } } }
java
public void processError(String msg) { synchronized (frameListeners) { Iterator<FrameListener> it = frameListeners.iterator(); while (it.hasNext()) { FrameListener listener = it.next(); listener.processError(msg); } } }
[ "public", "void", "processError", "(", "String", "msg", ")", "{", "synchronized", "(", "frameListeners", ")", "{", "Iterator", "<", "FrameListener", ">", "it", "=", "frameListeners", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(", ...
Called for each frame error detected. @param msg The error message @see de.quippy.jflac.FrameListener#processError(java.lang.String)
[ "Called", "for", "each", "frame", "error", "detected", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FrameListeners.java#L78-L86
150,658
jtrfp/javamod
src/main/java/de/quippy/javamod/main/gui/components/SAMeterPanel.java
SAMeterPanel.setMeter
public void setMeter(float [] newSamples) { if (newSamples!=null) { anzSamples = newSamples.length; if (floatSamples==null || floatSamples.length != anzSamples) floatSamples = new float[anzSamples]; System.arraycopy(newSamples, 0, floatSamples, 0, anzSamples); float [] resultFFTSamples = fftCalc.calcul...
java
public void setMeter(float [] newSamples) { if (newSamples!=null) { anzSamples = newSamples.length; if (floatSamples==null || floatSamples.length != anzSamples) floatSamples = new float[anzSamples]; System.arraycopy(newSamples, 0, floatSamples, 0, anzSamples); float [] resultFFTSamples = fftCalc.calcul...
[ "public", "void", "setMeter", "(", "float", "[", "]", "newSamples", ")", "{", "if", "(", "newSamples", "!=", "null", ")", "{", "anzSamples", "=", "newSamples", ".", "length", ";", "if", "(", "floatSamples", "==", "null", "||", "floatSamples", ".", "lengt...
Will set new Values @since 06.10.2007 @param newSamples
[ "Will", "set", "new", "Values" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/components/SAMeterPanel.java#L164-L196
150,659
jtrfp/javamod
src/main/java/de/quippy/javamod/main/gui/components/SAMeterPanel.java
SAMeterPanel.drawMeter
protected void drawMeter(Graphics g, int newTop, int newLeft, int newWidth, int newHeight, boolean doClear) { if (g!=null) { switch (drawWhat) { default: case DRAW_SA_METER: drawSAMeter(g, newTop, newLeft, newWidth, newHeight, doClear); break; case DRAW_WAVE_METER: drawWaveMeter(g, newTop, newLe...
java
protected void drawMeter(Graphics g, int newTop, int newLeft, int newWidth, int newHeight, boolean doClear) { if (g!=null) { switch (drawWhat) { default: case DRAW_SA_METER: drawSAMeter(g, newTop, newLeft, newWidth, newHeight, doClear); break; case DRAW_WAVE_METER: drawWaveMeter(g, newTop, newLe...
[ "protected", "void", "drawMeter", "(", "Graphics", "g", ",", "int", "newTop", ",", "int", "newLeft", ",", "int", "newWidth", ",", "int", "newHeight", ",", "boolean", "doClear", ")", "{", "if", "(", "g", "!=", "null", ")", "{", "switch", "(", "drawWhat"...
Internal method doing the drawing @param g @param newTop @param newLeft @param newWidth @param newHeight @param doClear @since 06.05.2011
[ "Internal", "method", "doing", "the", "drawing" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/components/SAMeterPanel.java#L215-L238
150,660
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mod/loader/tracker/XMMod.java
XMMod.isXMMod
private boolean isXMMod(String kennung) { if (kennung.equals("Extended Module: ")) return true; if (kennung.toLowerCase().equals("extended module: ")) return true; return false; }
java
private boolean isXMMod(String kennung) { if (kennung.equals("Extended Module: ")) return true; if (kennung.toLowerCase().equals("extended module: ")) return true; return false; }
[ "private", "boolean", "isXMMod", "(", "String", "kennung", ")", "{", "if", "(", "kennung", ".", "equals", "(", "\"Extended Module: \"", ")", ")", "return", "true", ";", "if", "(", "kennung", ".", "toLowerCase", "(", ")", ".", "equals", "(", "\"extended mod...
Get the ModType @param kennung @return
[ "Get", "the", "ModType" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/loader/tracker/XMMod.java#L150-L155
150,661
adamfisk/dnsjava-fork
src/org/xbill/DNS/DNSSEC.java
DNSSEC.algString
public static String algString(int alg) throws UnsupportedAlgorithmException { switch (alg) { case Algorithm.RSAMD5: return "MD5withRSA"; case Algorithm.DSA: case Algorithm.DSA_NSEC3_SHA1: return "SHA1withDSA"; case Algorithm.RSASHA1: case Algorithm.RSA_NSEC3_SHA1: return "SHA1withRSA"; case Algorithm.RSAS...
java
public static String algString(int alg) throws UnsupportedAlgorithmException { switch (alg) { case Algorithm.RSAMD5: return "MD5withRSA"; case Algorithm.DSA: case Algorithm.DSA_NSEC3_SHA1: return "SHA1withDSA"; case Algorithm.RSASHA1: case Algorithm.RSA_NSEC3_SHA1: return "SHA1withRSA"; case Algorithm.RSAS...
[ "public", "static", "String", "algString", "(", "int", "alg", ")", "throws", "UnsupportedAlgorithmException", "{", "switch", "(", "alg", ")", "{", "case", "Algorithm", ".", "RSAMD5", ":", "return", "\"MD5withRSA\"", ";", "case", "Algorithm", ".", "DSA", ":", ...
Convert an algorithm number to the corresponding JCA string. @param alg The algorithm number. @throws UnsupportedAlgorithmException The algorithm is unknown.
[ "Convert", "an", "algorithm", "number", "to", "the", "corresponding", "JCA", "string", "." ]
69510a1cad0518badb19a6615724313bebc61f90
https://github.com/adamfisk/dnsjava-fork/blob/69510a1cad0518badb19a6615724313bebc61f90/src/org/xbill/DNS/DNSSEC.java#L465-L483
150,662
jpaoletti/java-presentation-manager
modules/jpm-core/src/main/java/jpaoletti/jpm/util/Validator.java
Validator.matches
public static boolean matches(String pattern, String value) { Pattern p = Pattern.compile(pattern); Matcher m = p.matcher(value); return m.matches(); }
java
public static boolean matches(String pattern, String value) { Pattern p = Pattern.compile(pattern); Matcher m = p.matcher(value); return m.matches(); }
[ "public", "static", "boolean", "matches", "(", "String", "pattern", ",", "String", "value", ")", "{", "Pattern", "p", "=", "Pattern", ".", "compile", "(", "pattern", ")", ";", "Matcher", "m", "=", "p", ".", "matcher", "(", "value", ")", ";", "return", ...
Validate if the given value matches the pattern @param pattern The pattern @param value The value @return true if value matches pattern
[ "Validate", "if", "the", "given", "value", "matches", "the", "pattern" ]
d5aab55638383695db244744b4bfe27c5200e04f
https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/util/Validator.java#L46-L50
150,663
jpaoletti/java-presentation-manager
modules/jpm-core/src/main/java/jpaoletti/jpm/util/Validator.java
Validator.isLong
public static boolean isLong(String s) { if (s == null) { return false; } try { Long.parseLong(s.trim()); } catch (NumberFormatException e) { return false; } return true; }
java
public static boolean isLong(String s) { if (s == null) { return false; } try { Long.parseLong(s.trim()); } catch (NumberFormatException e) { return false; } return true; }
[ "public", "static", "boolean", "isLong", "(", "String", "s", ")", "{", "if", "(", "s", "==", "null", ")", "{", "return", "false", ";", "}", "try", "{", "Long", ".", "parseLong", "(", "s", ".", "trim", "(", ")", ")", ";", "}", "catch", "(", "Num...
Validate if the given string is a long @param s @return
[ "Validate", "if", "the", "given", "string", "is", "a", "long" ]
d5aab55638383695db244744b4bfe27c5200e04f
https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/util/Validator.java#L103-L113
150,664
GerdHolz/TOVAL
src/de/invation/code/toval/misc/CollectionUtils.java
CollectionUtils.containsNo
public static <T> boolean containsNo(Collection<T> baseList, Collection<T> valueList) { for (T v : valueList) { if (baseList.contains(v)) { return false; } } return true; }
java
public static <T> boolean containsNo(Collection<T> baseList, Collection<T> valueList) { for (T v : valueList) { if (baseList.contains(v)) { return false; } } return true; }
[ "public", "static", "<", "T", ">", "boolean", "containsNo", "(", "Collection", "<", "T", ">", "baseList", ",", "Collection", "<", "T", ">", "valueList", ")", "{", "for", "(", "T", "v", ":", "valueList", ")", "{", "if", "(", "baseList", ".", "contains...
Checks if the given basic list contains any element of the given value list. @param <T> Type of collection elements @param baseList List to check for occurrences @param valueList Values to search @return <code>true</code> if <code>baseList</code> contains any element of <code>valueList</code>; <code>false</code> other...
[ "Checks", "if", "the", "given", "basic", "list", "contains", "any", "element", "of", "the", "given", "value", "list", "." ]
036922cdfd710fa53b18e5dbe1e07f226f731fde
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/misc/CollectionUtils.java#L45-L52
150,665
hawkular/hawkular-inventory
hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/FilterVisitor.java
FilterVisitor.toInteger
private static Integer toInteger(String str) { char[] chars = str.toCharArray(); int result = 0; int multiplier = 1; for (int i = chars.length - 1; i >= 0; --i, multiplier *= 10) { char c = chars[i]; if ('0' <= c && c <= '9') { result += (c - '0'...
java
private static Integer toInteger(String str) { char[] chars = str.toCharArray(); int result = 0; int multiplier = 1; for (int i = chars.length - 1; i >= 0; --i, multiplier *= 10) { char c = chars[i]; if ('0' <= c && c <= '9') { result += (c - '0'...
[ "private", "static", "Integer", "toInteger", "(", "String", "str", ")", "{", "char", "[", "]", "chars", "=", "str", ".", "toCharArray", "(", ")", ";", "int", "result", "=", "0", ";", "int", "multiplier", "=", "1", ";", "for", "(", "int", "i", "=", ...
A very simplistic conversion of string to positive integer in only decimal radix. <p>This is used to figure out whether a segment id represents an index or a key. @param str the string potentially representing a number @return the parsed number or null if the string is not a supported number
[ "A", "very", "simplistic", "conversion", "of", "string", "to", "positive", "integer", "in", "only", "decimal", "radix", "." ]
f56dc10323dca21777feb5b609a9e9cc70ffaf62
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/FilterVisitor.java#L573-L589
150,666
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/shell/LineParser.java
LineParser.getToken
public String getToken(){ if(this.tokenPosition>0){ String[] ar = StringUtils.split(this.line, null, this.tokenPosition+1); if(ar!=null && ar.length>(this.tokenPosition-1)){ return StringUtils.trim(ar[this.tokenPosition-1]); } } return null; }
java
public String getToken(){ if(this.tokenPosition>0){ String[] ar = StringUtils.split(this.line, null, this.tokenPosition+1); if(ar!=null && ar.length>(this.tokenPosition-1)){ return StringUtils.trim(ar[this.tokenPosition-1]); } } return null; }
[ "public", "String", "getToken", "(", ")", "{", "if", "(", "this", ".", "tokenPosition", ">", "0", ")", "{", "String", "[", "]", "ar", "=", "StringUtils", ".", "split", "(", "this", ".", "line", ",", "null", ",", "this", ".", "tokenPosition", "+", "...
Returns an array of all tokens being parsed. @return token array
[ "Returns", "an", "array", "of", "all", "tokens", "being", "parsed", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/shell/LineParser.java#L71-L79
150,667
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/shell/LineParser.java
LineParser.getArgs
public String getArgs(){ int count = (this.tokenPosition==0)?1:this.tokenPosition+1; String[] ar = StringUtils.split(this.line, null, count); if(ar!=null && ar.length>(this.tokenPosition)){ return StringUtils.trim(ar[this.tokenPosition]); } return null; }
java
public String getArgs(){ int count = (this.tokenPosition==0)?1:this.tokenPosition+1; String[] ar = StringUtils.split(this.line, null, count); if(ar!=null && ar.length>(this.tokenPosition)){ return StringUtils.trim(ar[this.tokenPosition]); } return null; }
[ "public", "String", "getArgs", "(", ")", "{", "int", "count", "=", "(", "this", ".", "tokenPosition", "==", "0", ")", "?", "1", ":", "this", ".", "tokenPosition", "+", "1", ";", "String", "[", "]", "ar", "=", "StringUtils", ".", "split", "(", "this...
Returns an string of all tokens that can be considered being command arguments, using the current token position. @return argument string
[ "Returns", "an", "string", "of", "all", "tokens", "that", "can", "be", "considered", "being", "command", "arguments", "using", "the", "current", "token", "position", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/shell/LineParser.java#L85-L92
150,668
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/shell/LineParser.java
LineParser.getArgList
public ArrayList<String> getArgList(){ ArrayList<String> ret = new ArrayList<String>(); String[] ar = StringUtils.split(this.getArgs()); if(ar!=null){ for(String s : ar){ ret.add(StringUtils.trim(s)); } } return ret; }
java
public ArrayList<String> getArgList(){ ArrayList<String> ret = new ArrayList<String>(); String[] ar = StringUtils.split(this.getArgs()); if(ar!=null){ for(String s : ar){ ret.add(StringUtils.trim(s)); } } return ret; }
[ "public", "ArrayList", "<", "String", ">", "getArgList", "(", ")", "{", "ArrayList", "<", "String", ">", "ret", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "String", "[", "]", "ar", "=", "StringUtils", ".", "split", "(", "this", ".", ...
Returns a list of all tokens that can be considered being command arguments, using the current token position. @return argument list
[ "Returns", "a", "list", "of", "all", "tokens", "that", "can", "be", "considered", "being", "command", "arguments", "using", "the", "current", "token", "position", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/shell/LineParser.java#L98-L107
150,669
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/shell/LineParser.java
LineParser.getArgMap
public Map<String, String> getArgMap(){ Map<String, String> ret = new LinkedHashMap<String, String>(); String[] ar = StringUtils.split(this.getArgs(), ','); if(ar!=null){ for(String s : ar){ String[] kv = StringUtils.split(s, ":", 2); if(kv!=null && kv.length==2){ ret.put(StringUtils.trim(kv[0]), ...
java
public Map<String, String> getArgMap(){ Map<String, String> ret = new LinkedHashMap<String, String>(); String[] ar = StringUtils.split(this.getArgs(), ','); if(ar!=null){ for(String s : ar){ String[] kv = StringUtils.split(s, ":", 2); if(kv!=null && kv.length==2){ ret.put(StringUtils.trim(kv[0]), ...
[ "public", "Map", "<", "String", ",", "String", ">", "getArgMap", "(", ")", "{", "Map", "<", "String", ",", "String", ">", "ret", "=", "new", "LinkedHashMap", "<", "String", ",", "String", ">", "(", ")", ";", "String", "[", "]", "ar", "=", "StringUt...
Returns a map of all tokens that can be considered being command arguments, using the current token position. @return argument map, using ':' as key/value separator (and naturally white spaces as separator between pairs)
[ "Returns", "a", "map", "of", "all", "tokens", "that", "can", "be", "considered", "being", "command", "arguments", "using", "the", "current", "token", "position", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/shell/LineParser.java#L113-L128
150,670
GerdHolz/TOVAL
src/de/invation/code/toval/os/WindowsRegistry.java
WindowsRegistry.createKey
public static void createKey(String keyName) throws RegistryException { int[] info = invoke(Methods.REG_CREATE_KEY_EX.get(), keyParts(keyName)); checkError(info[InfoIndex.INFO_ERROR_CODE.get()]); invoke(Methods.REG_CLOSE_KEY.get(), info[InfoIndex.INFO_HANDLE.get()]); }
java
public static void createKey(String keyName) throws RegistryException { int[] info = invoke(Methods.REG_CREATE_KEY_EX.get(), keyParts(keyName)); checkError(info[InfoIndex.INFO_ERROR_CODE.get()]); invoke(Methods.REG_CLOSE_KEY.get(), info[InfoIndex.INFO_HANDLE.get()]); }
[ "public", "static", "void", "createKey", "(", "String", "keyName", ")", "throws", "RegistryException", "{", "int", "[", "]", "info", "=", "invoke", "(", "Methods", ".", "REG_CREATE_KEY_EX", ".", "get", "(", ")", ",", "keyParts", "(", "keyName", ")", ")", ...
Creates a key. Parent keys in the path will also be created if necessary. This method returns without error if the key already exists. @param keyName Key name (i.a. with parent keys) to be created. @throws RegistryException
[ "Creates", "a", "key", ".", "Parent", "keys", "in", "the", "path", "will", "also", "be", "created", "if", "necessary", ".", "This", "method", "returns", "without", "error", "if", "the", "key", "already", "exists", "." ]
036922cdfd710fa53b18e5dbe1e07f226f731fde
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/WindowsRegistry.java#L102-L106
150,671
GerdHolz/TOVAL
src/de/invation/code/toval/os/WindowsRegistry.java
WindowsRegistry.deleteKey
public static void deleteKey(String keyName) throws RegistryException { checkError(invoke(Methods.REG_DELETE_KEY.get(), keyParts(keyName))); }
java
public static void deleteKey(String keyName) throws RegistryException { checkError(invoke(Methods.REG_DELETE_KEY.get(), keyParts(keyName))); }
[ "public", "static", "void", "deleteKey", "(", "String", "keyName", ")", "throws", "RegistryException", "{", "checkError", "(", "invoke", "(", "Methods", ".", "REG_DELETE_KEY", ".", "get", "(", ")", ",", "keyParts", "(", "keyName", ")", ")", ")", ";", "}" ]
Deletes a key and all values within it. If the key has subkeys, an "Access denied" error will be thrown. Subkeys must be deleted separately. @param keyName Key name to delete. @throws RegistryException
[ "Deletes", "a", "key", "and", "all", "values", "within", "it", ".", "If", "the", "key", "has", "subkeys", "an", "Access", "denied", "error", "will", "be", "thrown", ".", "Subkeys", "must", "be", "deleted", "separately", "." ]
036922cdfd710fa53b18e5dbe1e07f226f731fde
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/WindowsRegistry.java#L115-L117
150,672
GerdHolz/TOVAL
src/de/invation/code/toval/os/WindowsRegistry.java
WindowsRegistry.deleteValue
public static void deleteValue(String keyName, String valueName) throws RegistryException { try (Key key = Key.open(keyName, KEY_WRITE)) { checkError(invoke(Methods.REG_DELETE_VALUE.get(), key.id, toByteArray(valueName))); } }
java
public static void deleteValue(String keyName, String valueName) throws RegistryException { try (Key key = Key.open(keyName, KEY_WRITE)) { checkError(invoke(Methods.REG_DELETE_VALUE.get(), key.id, toByteArray(valueName))); } }
[ "public", "static", "void", "deleteValue", "(", "String", "keyName", ",", "String", "valueName", ")", "throws", "RegistryException", "{", "try", "(", "Key", "key", "=", "Key", ".", "open", "(", "keyName", ",", "KEY_WRITE", ")", ")", "{", "checkError", "(",...
Deletes a value within a key. @param keyName Name of the key, which contains the value to delete. @param valueName Name of the value to delete. @throws RegistryException
[ "Deletes", "a", "value", "within", "a", "key", "." ]
036922cdfd710fa53b18e5dbe1e07f226f731fde
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/WindowsRegistry.java#L126-L130
150,673
GerdHolz/TOVAL
src/de/invation/code/toval/os/WindowsRegistry.java
WindowsRegistry.existsKey
public static boolean existsKey(String keyName) throws RegistryException { String[] keyNameParts = keyName.split(REG_PATH_SEPARATOR_REGEX); // first part must be valid hive if (Hive.getHive(keyNameParts[0]) == null) { return false; } for (int i = 1; i < keyNameParts...
java
public static boolean existsKey(String keyName) throws RegistryException { String[] keyNameParts = keyName.split(REG_PATH_SEPARATOR_REGEX); // first part must be valid hive if (Hive.getHive(keyNameParts[0]) == null) { return false; } for (int i = 1; i < keyNameParts...
[ "public", "static", "boolean", "existsKey", "(", "String", "keyName", ")", "throws", "RegistryException", "{", "String", "[", "]", "keyNameParts", "=", "keyName", ".", "split", "(", "REG_PATH_SEPARATOR_REGEX", ")", ";", "// first part must be valid hive", "if", "(",...
Checks if a given key exists. @param keyName Key name to check for existence. @return <code>true</code> if the key exists, otherwise <code>false</code>. @throws RegistryException
[ "Checks", "if", "a", "given", "key", "exists", "." ]
036922cdfd710fa53b18e5dbe1e07f226f731fde
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/WindowsRegistry.java#L140-L165
150,674
GerdHolz/TOVAL
src/de/invation/code/toval/os/WindowsRegistry.java
WindowsRegistry.readSubkeys
public static List<String> readSubkeys(String keyName) throws RegistryException { try (Key key = Key.open(keyName, KEY_READ)) { int[] info = invoke(Methods.REG_QUERY_INFO_KEY.get(), key.id); checkError(info[InfoIndex.INFO_ERROR_CODE.get()]); int count = info[InfoIndex.INFO_CO...
java
public static List<String> readSubkeys(String keyName) throws RegistryException { try (Key key = Key.open(keyName, KEY_READ)) { int[] info = invoke(Methods.REG_QUERY_INFO_KEY.get(), key.id); checkError(info[InfoIndex.INFO_ERROR_CODE.get()]); int count = info[InfoIndex.INFO_CO...
[ "public", "static", "List", "<", "String", ">", "readSubkeys", "(", "String", "keyName", ")", "throws", "RegistryException", "{", "try", "(", "Key", "key", "=", "Key", ".", "open", "(", "keyName", ",", "KEY_READ", ")", ")", "{", "int", "[", "]", "info"...
Returns a list of the names of all the subkeys of a key. @param keyName Key name to read all subkeys from. @return {@link List} of key names directly contained in the specified key. @throws RegistryException
[ "Returns", "a", "list", "of", "the", "names", "of", "all", "the", "subkeys", "of", "a", "key", "." ]
036922cdfd710fa53b18e5dbe1e07f226f731fde
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/WindowsRegistry.java#L227-L239
150,675
GerdHolz/TOVAL
src/de/invation/code/toval/os/WindowsRegistry.java
WindowsRegistry.readValue
public static String readValue(String keyName, String valueName) throws RegistryException { try (Key key = Key.open(keyName, KEY_READ)) { return fromByteArray(invoke(Methods.REG_QUERY_VALUE_EX.get(), key.id, toByteArray(valueName))); } }
java
public static String readValue(String keyName, String valueName) throws RegistryException { try (Key key = Key.open(keyName, KEY_READ)) { return fromByteArray(invoke(Methods.REG_QUERY_VALUE_EX.get(), key.id, toByteArray(valueName))); } }
[ "public", "static", "String", "readValue", "(", "String", "keyName", ",", "String", "valueName", ")", "throws", "RegistryException", "{", "try", "(", "Key", "key", "=", "Key", ".", "open", "(", "keyName", ",", "KEY_READ", ")", ")", "{", "return", "fromByte...
Reads a string value from the given key and value name. @param keyName Name of the key, which contains the value to read. @param valueName Name of the value to read. @return Content of the specified value. @throws RegistryException
[ "Reads", "a", "string", "value", "from", "the", "given", "key", "and", "value", "name", "." ]
036922cdfd710fa53b18e5dbe1e07f226f731fde
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/WindowsRegistry.java#L249-L253
150,676
GerdHolz/TOVAL
src/de/invation/code/toval/os/WindowsRegistry.java
WindowsRegistry.readValues
public static Map<String, String> readValues(String keyName) throws RegistryException { try (Key key = Key.open(keyName, KEY_READ)) { int[] info = invoke(Methods.REG_QUERY_INFO_KEY.get(), key.id); checkError(info[InfoIndex.INFO_ERROR_CODE.get()]); int count = info[InfoIndex.I...
java
public static Map<String, String> readValues(String keyName) throws RegistryException { try (Key key = Key.open(keyName, KEY_READ)) { int[] info = invoke(Methods.REG_QUERY_INFO_KEY.get(), key.id); checkError(info[InfoIndex.INFO_ERROR_CODE.get()]); int count = info[InfoIndex.I...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "readValues", "(", "String", "keyName", ")", "throws", "RegistryException", "{", "try", "(", "Key", "key", "=", "Key", ".", "open", "(", "keyName", ",", "KEY_READ", ")", ")", "{", "int", "["...
Returns a map of all the name-value pairs in the given key. @param keyName Name of the key to read all values from. @return {@link Map} of value name and value content pairs. @throws RegistryException
[ "Returns", "a", "map", "of", "all", "the", "name", "-", "value", "pairs", "in", "the", "given", "key", "." ]
036922cdfd710fa53b18e5dbe1e07f226f731fde
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/WindowsRegistry.java#L262-L275
150,677
GerdHolz/TOVAL
src/de/invation/code/toval/os/WindowsRegistry.java
WindowsRegistry.writeValue
public static void writeValue(String keyName, String valueName, String value) throws RegistryException { try (Key key = Key.open(keyName, KEY_WRITE)) { checkError(invoke(Methods.REG_SET_VALUE_EX.get(), key.id, toByteArray(valueName), toByteArray(value))); } }
java
public static void writeValue(String keyName, String valueName, String value) throws RegistryException { try (Key key = Key.open(keyName, KEY_WRITE)) { checkError(invoke(Methods.REG_SET_VALUE_EX.get(), key.id, toByteArray(valueName), toByteArray(value))); } }
[ "public", "static", "void", "writeValue", "(", "String", "keyName", ",", "String", "valueName", ",", "String", "value", ")", "throws", "RegistryException", "{", "try", "(", "Key", "key", "=", "Key", ".", "open", "(", "keyName", ",", "KEY_WRITE", ")", ")", ...
Writes a string value with a given key and value name. @param keyName Name of the key to write the value in. @param valueName Name of the value. @param value Content of the value. @throws RegistryException
[ "Writes", "a", "string", "value", "with", "a", "given", "key", "and", "value", "name", "." ]
036922cdfd710fa53b18e5dbe1e07f226f731fde
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/WindowsRegistry.java#L299-L303
150,678
ClouDesire/tisana4j
src/main/java/com/cloudesire/tisana4j/RestClient.java
RestClient.execute
private HttpResponse execute( HttpUriRequest request ) throws RestException { log.debug( ">>>> " + request.getRequestLine() ); for ( Header header : request.getAllHeaders() ) { log.trace( ">>>> " + header.getName() + ": " + header.getValue() ); } HttpResponse res...
java
private HttpResponse execute( HttpUriRequest request ) throws RestException { log.debug( ">>>> " + request.getRequestLine() ); for ( Header header : request.getAllHeaders() ) { log.trace( ">>>> " + header.getName() + ": " + header.getValue() ); } HttpResponse res...
[ "private", "HttpResponse", "execute", "(", "HttpUriRequest", "request", ")", "throws", "RestException", "{", "log", ".", "debug", "(", "\">>>> \"", "+", "request", ".", "getRequestLine", "(", ")", ")", ";", "for", "(", "Header", "header", ":", "request", "."...
Internal execute, log headers, check for errors @param request The request object to be executed @return HttpResponse Response replied by the server @throws RestException
[ "Internal", "execute", "log", "headers", "check", "for", "errors" ]
6cdee82d15b0f4451e44e4f7b79cfa4eebbbc944
https://github.com/ClouDesire/tisana4j/blob/6cdee82d15b0f4451e44e4f7b79cfa4eebbbc944/src/main/java/com/cloudesire/tisana4j/RestClient.java#L737-L773
150,679
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/streaming/IcyInputStream.java
IcyInputStream.readInitialHeaders
protected void readInitialHeaders() throws IOException { String line; while ((line = readCRLFLine()).length()!=0) { int colonIndex = line.indexOf(':'); // does it have a ':' separator if (colonIndex == -1) continue; String tagName = line.substring(0, colonIndex); String value = line.substring(colo...
java
protected void readInitialHeaders() throws IOException { String line; while ((line = readCRLFLine()).length()!=0) { int colonIndex = line.indexOf(':'); // does it have a ':' separator if (colonIndex == -1) continue; String tagName = line.substring(0, colonIndex); String value = line.substring(colo...
[ "protected", "void", "readInitialHeaders", "(", ")", "throws", "IOException", "{", "String", "line", ";", "while", "(", "(", "line", "=", "readCRLFLine", "(", ")", ")", ".", "length", "(", ")", "!=", "0", ")", "{", "int", "colonIndex", "=", "line", "."...
Assuming we're at the top of the stream, read lines one by one until we hit a completely blank \r\n. Parse the data as IcyTags.
[ "Assuming", "we", "re", "at", "the", "top", "of", "the", "stream", "read", "lines", "one", "by", "one", "until", "we", "hit", "a", "completely", "blank", "\\", "r", "\\", "n", ".", "Parse", "the", "data", "as", "IcyTags", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/streaming/IcyInputStream.java#L183-L197
150,680
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/streaming/IcyInputStream.java
IcyInputStream.readCRLFLine
protected String readCRLFLine() throws IOException { int i = 0; while (i<1024) { byte aByte = (byte) read(); if (aByte=='\n') break; if (aByte=='\r') continue; crlfBuffer[i++] = aByte; } return charsetDecoder.decode(ByteBuffer.wrap(crlfBuffer, 0, i)).toString(); }
java
protected String readCRLFLine() throws IOException { int i = 0; while (i<1024) { byte aByte = (byte) read(); if (aByte=='\n') break; if (aByte=='\r') continue; crlfBuffer[i++] = aByte; } return charsetDecoder.decode(ByteBuffer.wrap(crlfBuffer, 0, i)).toString(); }
[ "protected", "String", "readCRLFLine", "(", ")", "throws", "IOException", "{", "int", "i", "=", "0", ";", "while", "(", "i", "<", "1024", ")", "{", "byte", "aByte", "=", "(", "byte", ")", "read", "(", ")", ";", "if", "(", "aByte", "==", "'", "'",...
Read everything up to the next CRLF, return it as a String.
[ "Read", "everything", "up", "to", "the", "next", "CRLF", "return", "it", "as", "a", "String", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/streaming/IcyInputStream.java#L202-L213
150,681
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/streaming/IcyInputStream.java
IcyInputStream.read
public synchronized int read() throws IOException { if (bytesUntilNextMetadata > 0) { bytesUntilNextMetadata--; return super.read(); } else if (bytesUntilNextMetadata == 0) { readMetadata(); bytesUntilNextMetadata = metaint - 1; // -1 because we read byte on next line return super.read()...
java
public synchronized int read() throws IOException { if (bytesUntilNextMetadata > 0) { bytesUntilNextMetadata--; return super.read(); } else if (bytesUntilNextMetadata == 0) { readMetadata(); bytesUntilNextMetadata = metaint - 1; // -1 because we read byte on next line return super.read()...
[ "public", "synchronized", "int", "read", "(", ")", "throws", "IOException", "{", "if", "(", "bytesUntilNextMetadata", ">", "0", ")", "{", "bytesUntilNextMetadata", "--", ";", "return", "super", ".", "read", "(", ")", ";", "}", "else", "if", "(", "bytesUnti...
Reads and returns a single byte. If the next byte is a metadata block, then that block is read, stripped, and parsed before reading and returning the first byte after the metadata block.
[ "Reads", "and", "returns", "a", "single", "byte", ".", "If", "the", "next", "byte", "is", "a", "metadata", "block", "then", "that", "block", "is", "read", "stripped", "and", "parsed", "before", "reading", "and", "returning", "the", "first", "byte", "after"...
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/streaming/IcyInputStream.java#L220-L239
150,682
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/streaming/IcyInputStream.java
IcyInputStream.addTag
protected void addTag(IcyTag tag) { tags.put(tag.getName(), tag); fireTagParsed(this, tag); }
java
protected void addTag(IcyTag tag) { tags.put(tag.getName(), tag); fireTagParsed(this, tag); }
[ "protected", "void", "addTag", "(", "IcyTag", "tag", ")", "{", "tags", ".", "put", "(", "tag", ".", "getName", "(", ")", ",", "tag", ")", ";", "fireTagParsed", "(", "this", ",", "tag", ")", ";", "}" ]
adds the tag to the HashMap of tags we have encountered either in-stream or as headers, replacing any previous tag with this name.
[ "adds", "the", "tag", "to", "the", "HashMap", "of", "tags", "we", "have", "encountered", "either", "in", "-", "stream", "or", "as", "headers", "replacing", "any", "previous", "tag", "with", "this", "name", "." ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/streaming/IcyInputStream.java#L355-L359
150,683
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/streaming/IcyInputStream.java
IcyInputStream.fireTagParseEvent
public void fireTagParseEvent(TagParseEvent tpe) { for (int i = 0; i < tagParseListeners.size(); i++) { TagParseListener l = tagParseListeners.get(i); l.tagParsed(tpe); } }
java
public void fireTagParseEvent(TagParseEvent tpe) { for (int i = 0; i < tagParseListeners.size(); i++) { TagParseListener l = tagParseListeners.get(i); l.tagParsed(tpe); } }
[ "public", "void", "fireTagParseEvent", "(", "TagParseEvent", "tpe", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tagParseListeners", ".", "size", "(", ")", ";", "i", "++", ")", "{", "TagParseListener", "l", "=", "tagParseListeners", ".", ...
Fires the given event to all registered listeners
[ "Fires", "the", "given", "event", "to", "all", "registered", "listeners" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/streaming/IcyInputStream.java#L399-L406
150,684
jpaoletti/java-presentation-manager
modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/PMStrutsContext.java
PMStrutsContext.getEntitySupport
public PMEntitySupport getEntitySupport() { PMEntitySupport r = (PMEntitySupport) getRequest().getSession().getAttribute(ENTITY_SUPPORT); return r; }
java
public PMEntitySupport getEntitySupport() { PMEntitySupport r = (PMEntitySupport) getRequest().getSession().getAttribute(ENTITY_SUPPORT); return r; }
[ "public", "PMEntitySupport", "getEntitySupport", "(", ")", "{", "PMEntitySupport", "r", "=", "(", "PMEntitySupport", ")", "getRequest", "(", ")", ".", "getSession", "(", ")", ".", "getAttribute", "(", "ENTITY_SUPPORT", ")", ";", "return", "r", ";", "}" ]
Getter for the entity support helper object @return The entity support
[ "Getter", "for", "the", "entity", "support", "helper", "object" ]
d5aab55638383695db244744b4bfe27c5200e04f
https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/PMStrutsContext.java#L112-L115
150,685
jtrfp/javamod
src/main/java/de/quippy/javamod/mixer/dsp/FFT.java
FFT.prepareFFTTables
private void prepareFFTTables() { int n2 = ss2; int nu1 = nu-1; int k = 0; int x = 0; for (int l=1; l<=nu; l++) { while (k < ss) { for (int i=1; i<=n2; i++) { double p = (double)bitrev(k >> nu1, nu); double arg = (Math.PI * p * 2.0D) / (double) ss; fftSin[x] = (long) (Math.sin(...
java
private void prepareFFTTables() { int n2 = ss2; int nu1 = nu-1; int k = 0; int x = 0; for (int l=1; l<=nu; l++) { while (k < ss) { for (int i=1; i<=n2; i++) { double p = (double)bitrev(k >> nu1, nu); double arg = (Math.PI * p * 2.0D) / (double) ss; fftSin[x] = (long) (Math.sin(...
[ "private", "void", "prepareFFTTables", "(", ")", "{", "int", "n2", "=", "ss2", ";", "int", "nu1", "=", "nu", "-", "1", ";", "int", "k", "=", "0", ";", "int", "x", "=", "0", ";", "for", "(", "int", "l", "=", "1", ";", "l", "<=", "nu", ";", ...
We will here precalculate all sin and cos values and all other things we can store @since 03.10.2007
[ "We", "will", "here", "precalculate", "all", "sin", "and", "cos", "values", "and", "all", "other", "things", "we", "can", "store" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/mixer/dsp/FFT.java#L71-L100
150,686
jtrfp/javamod
src/main/java/de/quippy/javamod/mixer/dsp/FFT.java
FFT.longSqrt
private static long longSqrt(long value) { final int scale = 8; int bits = 64; long sqrt=0; long rest=0; for (int i=0; i<scale; i++) { bits -= 8; rest = (rest<<8) | ((value>>bits)&0xFF); long i2 = (sqrt<<5)+1; int k0=0; while (true) { long i3 = rest-i2; if (i3<0) break; ...
java
private static long longSqrt(long value) { final int scale = 8; int bits = 64; long sqrt=0; long rest=0; for (int i=0; i<scale; i++) { bits -= 8; rest = (rest<<8) | ((value>>bits)&0xFF); long i2 = (sqrt<<5)+1; int k0=0; while (true) { long i3 = rest-i2; if (i3<0) break; ...
[ "private", "static", "long", "longSqrt", "(", "long", "value", ")", "{", "final", "int", "scale", "=", "8", ";", "int", "bits", "=", "64", ";", "long", "sqrt", "=", "0", ";", "long", "rest", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";",...
This will calculate the integer sqrt from a long value @since 03.10.2007 @param value @return
[ "This", "will", "calculate", "the", "integer", "sqrt", "from", "a", "long", "value" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/mixer/dsp/FFT.java#L107-L133
150,687
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/info/STGroupValidator.java
STGroupValidator.validate
protected void validate(STGroup stg, Map<String, Set<String>> expectedChunks){ for (String s : expectedChunks.keySet()){ //null and "" are no valid templates, so we ignore them if(s!=null && !"".equals(s)){ if(stg.isDefined(s)){ STValidator stv = new STValidator(stg.getInstanceOf(s), expectedChunks.get...
java
protected void validate(STGroup stg, Map<String, Set<String>> expectedChunks){ for (String s : expectedChunks.keySet()){ //null and "" are no valid templates, so we ignore them if(s!=null && !"".equals(s)){ if(stg.isDefined(s)){ STValidator stv = new STValidator(stg.getInstanceOf(s), expectedChunks.get...
[ "protected", "void", "validate", "(", "STGroup", "stg", ",", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "expectedChunks", ")", "{", "for", "(", "String", "s", ":", "expectedChunks", ".", "keySet", "(", ")", ")", "{", "//null and \"\" are ...
Does the actual validation of the STGroup. @param stg the STGroup to validate @param expectedChunks the expected chunks (methods and their arguments) to validate against
[ "Does", "the", "actual", "validation", "of", "the", "STGroup", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/info/STGroupValidator.java#L69-L82
150,688
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/info/STGroupValidator.java
STGroupValidator.GET_STG_NAME
public static final String GET_STG_NAME(STGroup stg){ String ret = null; if(stg instanceof STGroupFile){ ret = ((STGroupFile)stg).fileName; } else if(stg instanceof STGroupString){ ret = ((STGroupString)stg).sourceName; } else if(stg instanceof STGroupDir){ ret = ((STGroupDir)stg).groupDirName; }...
java
public static final String GET_STG_NAME(STGroup stg){ String ret = null; if(stg instanceof STGroupFile){ ret = ((STGroupFile)stg).fileName; } else if(stg instanceof STGroupString){ ret = ((STGroupString)stg).sourceName; } else if(stg instanceof STGroupDir){ ret = ((STGroupDir)stg).groupDirName; }...
[ "public", "static", "final", "String", "GET_STG_NAME", "(", "STGroup", "stg", ")", "{", "String", "ret", "=", "null", ";", "if", "(", "stg", "instanceof", "STGroupFile", ")", "{", "ret", "=", "(", "(", "STGroupFile", ")", "stg", ")", ".", "fileName", "...
Returns the name of the STGroup. Any file extension will be removed from the returned name. @param stg STGroup @return name of the group or null
[ "Returns", "the", "name", "of", "the", "STGroup", ".", "Any", "file", "extension", "will", "be", "removed", "from", "the", "returned", "name", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/info/STGroupValidator.java#L100-L112
150,689
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/managers/MessageMgrBuilder.java
MessageMgrBuilder.setHandler
public MessageMgrBuilder setHandler(E_MessageType type){ if(type!=null){ this.messageHandlers.put(type, new MessageTypeHandler(type)); } else{ this.buildErrors.addError("{}: cannot add handler for empty type", this.getClass().getSimpleName()); } return this; }
java
public MessageMgrBuilder setHandler(E_MessageType type){ if(type!=null){ this.messageHandlers.put(type, new MessageTypeHandler(type)); } else{ this.buildErrors.addError("{}: cannot add handler for empty type", this.getClass().getSimpleName()); } return this; }
[ "public", "MessageMgrBuilder", "setHandler", "(", "E_MessageType", "type", ")", "{", "if", "(", "type", "!=", "null", ")", "{", "this", ".", "messageHandlers", ".", "put", "(", "type", ",", "new", "MessageTypeHandler", "(", "type", ")", ")", ";", "}", "e...
Activate a message type and sets a type handler with max count set to 100. An existing handler will be overwritten. @param type message type to be activated, nothing will be set if null @return self to allow for chaining
[ "Activate", "a", "message", "type", "and", "sets", "a", "type", "handler", "with", "max", "count", "set", "to", "100", ".", "An", "existing", "handler", "will", "be", "overwritten", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgrBuilder.java#L80-L88
150,690
mytechia/mytechia_commons
mytechia_commons_library/src/main/java/com/mytechia/commons/util/thread/Threads.java
Threads.findRootThreadGroup
public static ThreadGroup findRootThreadGroup() { ThreadGroup root = Thread.currentThread().getThreadGroup(); while (root.getParent() != null) { root = root.getParent(); } return root; }
java
public static ThreadGroup findRootThreadGroup() { ThreadGroup root = Thread.currentThread().getThreadGroup(); while (root.getParent() != null) { root = root.getParent(); } return root; }
[ "public", "static", "ThreadGroup", "findRootThreadGroup", "(", ")", "{", "ThreadGroup", "root", "=", "Thread", ".", "currentThread", "(", ")", ".", "getThreadGroup", "(", ")", ";", "while", "(", "root", ".", "getParent", "(", ")", "!=", "null", ")", "{", ...
Find the root thread group. @return
[ "Find", "the", "root", "thread", "group", "." ]
02251879085f271a1fb51663a1c8eddc8be78ae7
https://github.com/mytechia/mytechia_commons/blob/02251879085f271a1fb51663a1c8eddc8be78ae7/mytechia_commons_library/src/main/java/com/mytechia/commons/util/thread/Threads.java#L36-L43
150,691
mytechia/mytechia_commons
mytechia_commons_library/src/main/java/com/mytechia/commons/util/thread/Threads.java
Threads.findActiveThreadByName
private static Thread findActiveThreadByName(ThreadGroup group, String threadName) { Thread result = null; // Get threads in 'group' int numThreads = group.activeCount(); Thread[] threads = new Thread[numThreads * 2]; numThreads = group.enumerate(threads, false); ...
java
private static Thread findActiveThreadByName(ThreadGroup group, String threadName) { Thread result = null; // Get threads in 'group' int numThreads = group.activeCount(); Thread[] threads = new Thread[numThreads * 2]; numThreads = group.enumerate(threads, false); ...
[ "private", "static", "Thread", "findActiveThreadByName", "(", "ThreadGroup", "group", ",", "String", "threadName", ")", "{", "Thread", "result", "=", "null", ";", "// Get threads in 'group'", "int", "numThreads", "=", "group", ".", "activeCount", "(", ")", ";", ...
This method recursively visits all thread groups under 'group', searching for the active thread with name 'threadName'. @param group @param threadName @return
[ "This", "method", "recursively", "visits", "all", "thread", "groups", "under", "group", "searching", "for", "the", "active", "thread", "with", "name", "threadName", "." ]
02251879085f271a1fb51663a1c8eddc8be78ae7
https://github.com/mytechia/mytechia_commons/blob/02251879085f271a1fb51663a1c8eddc8be78ae7/mytechia_commons_library/src/main/java/com/mytechia/commons/util/thread/Threads.java#L65-L96
150,692
livetribe/livetribe-slp
core/src/main/java/org/livetribe/slp/spi/msg/ScopeListExtension.java
ScopeListExtension.findFirst
public static ScopeListExtension findFirst(Collection<? extends Extension> extensions) { for (Extension extension : extensions) { if (SCOPE_LIST_EXTENSION_ID == extension.getId()) return (ScopeListExtension)extension; } return null; }
java
public static ScopeListExtension findFirst(Collection<? extends Extension> extensions) { for (Extension extension : extensions) { if (SCOPE_LIST_EXTENSION_ID == extension.getId()) return (ScopeListExtension)extension; } return null; }
[ "public", "static", "ScopeListExtension", "findFirst", "(", "Collection", "<", "?", "extends", "Extension", ">", "extensions", ")", "{", "for", "(", "Extension", "extension", ":", "extensions", ")", "{", "if", "(", "SCOPE_LIST_EXTENSION_ID", "==", "extension", "...
Returns the first ScopeListExtension found in the given collection of extensions, or null if the extension collection does not contain a ScopeListExtension.
[ "Returns", "the", "first", "ScopeListExtension", "found", "in", "the", "given", "collection", "of", "extensions", "or", "null", "if", "the", "extension", "collection", "does", "not", "contain", "a", "ScopeListExtension", "." ]
6cc13dbe81feab133fe3dd291ca081cbc6e1f591
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/spi/msg/ScopeListExtension.java#L167-L175
150,693
livetribe/livetribe-slp
core/src/main/java/org/livetribe/slp/spi/msg/ScopeListExtension.java
ScopeListExtension.findAll
public static List<ScopeListExtension> findAll(Collection<? extends Extension> extensions) { List<ScopeListExtension> result = new ArrayList<ScopeListExtension>(); for (Extension extension : extensions) { if (SCOPE_LIST_EXTENSION_ID == extension.getId()) result.ad...
java
public static List<ScopeListExtension> findAll(Collection<? extends Extension> extensions) { List<ScopeListExtension> result = new ArrayList<ScopeListExtension>(); for (Extension extension : extensions) { if (SCOPE_LIST_EXTENSION_ID == extension.getId()) result.ad...
[ "public", "static", "List", "<", "ScopeListExtension", ">", "findAll", "(", "Collection", "<", "?", "extends", "Extension", ">", "extensions", ")", "{", "List", "<", "ScopeListExtension", ">", "result", "=", "new", "ArrayList", "<", "ScopeListExtension", ">", ...
Returns all ScopeListExtension found in the given collection of extensions, or an empty list if the extension collection does not contain ScopeListExtensions.
[ "Returns", "all", "ScopeListExtension", "found", "in", "the", "given", "collection", "of", "extensions", "or", "an", "empty", "list", "if", "the", "extension", "collection", "does", "not", "contain", "ScopeListExtensions", "." ]
6cc13dbe81feab133fe3dd291ca081cbc6e1f591
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/spi/msg/ScopeListExtension.java#L181-L190
150,694
dbflute-session/mailflute
src/main/java/org/dbflute/mail/Postcard.java
Postcard.pushUlterior
public void pushUlterior(String key, Object value) { assertArgumentNotNull("key", key); assertArgumentNotNull("value", value); if (pushedUlteriorMap == null) { pushedUlteriorMap = new LinkedHashMap<String, Object>(4); } pushedUlteriorMap.put(key, value); }
java
public void pushUlterior(String key, Object value) { assertArgumentNotNull("key", key); assertArgumentNotNull("value", value); if (pushedUlteriorMap == null) { pushedUlteriorMap = new LinkedHashMap<String, Object>(4); } pushedUlteriorMap.put(key, value); }
[ "public", "void", "pushUlterior", "(", "String", "key", ",", "Object", "value", ")", "{", "assertArgumentNotNull", "(", "\"key\"", ",", "key", ")", ";", "assertArgumentNotNull", "(", "\"value\"", ",", "value", ")", ";", "if", "(", "pushedUlteriorMap", "==", ...
basically unused in mailflute, this is for extension by application
[ "basically", "unused", "in", "mailflute", "this", "is", "for", "extension", "by", "application" ]
e41da4984131b09d55060e247fa4831682bc40a9
https://github.com/dbflute-session/mailflute/blob/e41da4984131b09d55060e247fa4831682bc40a9/src/main/java/org/dbflute/mail/Postcard.java#L351-L358
150,695
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/util/LimitAsyncOperations.java
LimitAsyncOperations.write
public AsyncWork<OutputResultType, OutputErrorType> write(InputType data) throws IOException { do { SynchronizationPoint<NoException> lk; synchronized (waiting) { // if cancelled or errored, return immediately if (error != null) return new AsyncWork<>(null, error); if (cancelled != null) retur...
java
public AsyncWork<OutputResultType, OutputErrorType> write(InputType data) throws IOException { do { SynchronizationPoint<NoException> lk; synchronized (waiting) { // if cancelled or errored, return immediately if (error != null) return new AsyncWork<>(null, error); if (cancelled != null) retur...
[ "public", "AsyncWork", "<", "OutputResultType", ",", "OutputErrorType", ">", "write", "(", "InputType", "data", ")", "throws", "IOException", "{", "do", "{", "SynchronizationPoint", "<", "NoException", ">", "lk", ";", "synchronized", "(", "waiting", ")", "{", ...
Queue the data to write. If there is no pending write, the write operation is started. If too many write operations are pending, the method is blocking. @param data the data to write.
[ "Queue", "the", "data", "to", "write", ".", "If", "there", "is", "no", "pending", "write", "the", "write", "operation", "is", "started", ".", "If", "too", "many", "write", "operations", "are", "pending", "the", "method", "is", "blocking", "." ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/util/LimitAsyncOperations.java#L56-L87
150,696
GerdHolz/TOVAL
src/de/invation/code/toval/debug/Debug.java
Debug.newLine
public static void newLine(DebugMode mode){ if(debugMode == DebugMode.SILENT) return; if(mode.ordinal() >= debugMode.ordinal()){ if(outputMode == OutputMode.SYSOUT){ printStream.println(); } else if(outputMode == OutputMode.FILE){ try { fileWriter.newLine(); } catch (IOException e) { ...
java
public static void newLine(DebugMode mode){ if(debugMode == DebugMode.SILENT) return; if(mode.ordinal() >= debugMode.ordinal()){ if(outputMode == OutputMode.SYSOUT){ printStream.println(); } else if(outputMode == OutputMode.FILE){ try { fileWriter.newLine(); } catch (IOException e) { ...
[ "public", "static", "void", "newLine", "(", "DebugMode", "mode", ")", "{", "if", "(", "debugMode", "==", "DebugMode", ".", "SILENT", ")", "return", ";", "if", "(", "mode", ".", "ordinal", "(", ")", ">=", "debugMode", ".", "ordinal", "(", ")", ")", "{...
Prints a new line
[ "Prints", "a", "new", "line" ]
036922cdfd710fa53b18e5dbe1e07f226f731fde
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/debug/Debug.java#L196-L210
150,697
akarnokd/akarnokd-xml
src/main/java/hu/akarnokd/xml/XSerializables.java
XSerializables.storeList
public static XElement storeList(String container, String item, Iterable<? extends XSerializable> source) { XElement result = new XElement(container); for (XSerializable e : source) { e.save(result.add(item)); } return result; }
java
public static XElement storeList(String container, String item, Iterable<? extends XSerializable> source) { XElement result = new XElement(container); for (XSerializable e : source) { e.save(result.add(item)); } return result; }
[ "public", "static", "XElement", "storeList", "(", "String", "container", ",", "String", "item", ",", "Iterable", "<", "?", "extends", "XSerializable", ">", "source", ")", "{", "XElement", "result", "=", "new", "XElement", "(", "container", ")", ";", "for", ...
Create an XElement with the given name and items stored from the source sequence. @param container the container name @param item the item name @param source the source of items @return the list in XElement
[ "Create", "an", "XElement", "with", "the", "given", "name", "and", "items", "stored", "from", "the", "source", "sequence", "." ]
57466a5a9cb455a13d7121557c165287b31ee870
https://github.com/akarnokd/akarnokd-xml/blob/57466a5a9cb455a13d7121557c165287b31ee870/src/main/java/hu/akarnokd/xml/XSerializables.java#L92-L98
150,698
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/io/text/DefaultDecoder.java
DefaultDecoder.transferTo
@Override public void transferTo(Decoder newDecoder) { super.transferTo(newDecoder); if (remainingBytesLength > 0) { if (currentBuffer == null || !currentBuffer.hasRemaining()) currentBuffer = ByteBuffer.wrap(remainingBytes, 0, remainingBytesLength); else { byte[] b = new byte[remainingBytesLength + ...
java
@Override public void transferTo(Decoder newDecoder) { super.transferTo(newDecoder); if (remainingBytesLength > 0) { if (currentBuffer == null || !currentBuffer.hasRemaining()) currentBuffer = ByteBuffer.wrap(remainingBytes, 0, remainingBytesLength); else { byte[] b = new byte[remainingBytesLength + ...
[ "@", "Override", "public", "void", "transferTo", "(", "Decoder", "newDecoder", ")", "{", "super", ".", "transferTo", "(", "newDecoder", ")", ";", "if", "(", "remainingBytesLength", ">", "0", ")", "{", "if", "(", "currentBuffer", "==", "null", "||", "!", ...
used in case of overflow, but this is usually an error
[ "used", "in", "case", "of", "overflow", "but", "this", "is", "usually", "an", "error" ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/text/DefaultDecoder.java#L25-L38
150,699
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/info/AbstractFileInfo.java
AbstractFileInfo.tryFS
protected final boolean tryFS(String directory, String fileName){ String path = directory + "/" + fileName; if(directory==null){ path = fileName; } File file = new File(path); if(this.testFile(file)==true){ //found in file system try{ this.url = file.toURI().toURL(); this.file = file; thi...
java
protected final boolean tryFS(String directory, String fileName){ String path = directory + "/" + fileName; if(directory==null){ path = fileName; } File file = new File(path); if(this.testFile(file)==true){ //found in file system try{ this.url = file.toURI().toURL(); this.file = file; thi...
[ "protected", "final", "boolean", "tryFS", "(", "String", "directory", ",", "String", "fileName", ")", "{", "String", "path", "=", "directory", "+", "\"/\"", "+", "fileName", ";", "if", "(", "directory", "==", "null", ")", "{", "path", "=", "fileName", ";...
Try to locate a file in the file system. @param directory a directory to locate the file in @param fileName a file name with optional path information @return true if the file was found, false otherwise
[ "Try", "to", "locate", "a", "file", "in", "the", "file", "system", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/info/AbstractFileInfo.java#L327-L349