Searched defs:bytes (Results 1 - 25 of 38) sorted by relevance

12

/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/util/
H A DToStringUtils.java36 public static void byteArray(StringBuilder buffer, byte[] bytes) { argument
37 for (int i = 0; i < bytes.length; i++) {
38 buffer.append("b[").append(i).append("]=").append(bytes[i]);
39 if (i < bytes.length - 1) {
H A DSortedVIntList.java48 private byte[] bytes; field in class:SortedVIntList
119 if ((lastBytePos + MAX_BYTES_PER_INT) > bytes.length) {
126 bytes[lastBytePos++] = (byte) ((diff & VB1) | ~VB1);
129 bytes[lastBytePos++] = (byte) diff; // Last byte, high bit not set.
142 bytes = new byte[128]; // initial byte size
147 if (newSize != bytes.length) {
149 System.arraycopy(bytes, 0, newBytes, 0, lastBytePos);
150 bytes = newBytes;
169 return bytes.length;
190 byte b = bytes[bytePo
[all...]
H A DBytesRef.java32 public byte[] bytes; field in class:BytesRef
37 /** Length of used bytes. */
45 /** This instance will directly reference bytes w/o making a copy.
46 * bytes should not be null.
48 public BytesRef(byte[] bytes, int offset, int length) { argument
49 assert bytes != null;
50 this.bytes = bytes;
55 /** This instance will directly reference bytes w/o making a copy.
56 * bytes shoul
57 BytesRef(byte[] bytes) argument
[all...]
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/store/
H A DByteArrayDataOutput.java29 private byte[] bytes; field in class:ByteArrayDataOutput
34 public ByteArrayDataOutput(byte[] bytes) { argument
35 reset(bytes);
38 public ByteArrayDataOutput(byte[] bytes, int offset, int len) { argument
39 reset(bytes, offset, len);
46 public void reset(byte[] bytes) { argument
47 reset(bytes, 0, bytes.length);
50 public void reset(byte[] bytes, int offset, int len) { argument
51 this.bytes
[all...]
H A DByteArrayDataInput.java29 private byte[] bytes; field in class:ByteArrayDataInput
34 public ByteArrayDataInput(byte[] bytes) { argument
35 reset(bytes);
38 public ByteArrayDataInput(byte[] bytes, int offset, int len) { argument
39 reset(bytes, offset, len);
46 public void reset(byte[] bytes) { argument
47 reset(bytes, 0, bytes.length);
54 public void reset(byte[] bytes, int offset, int len) { argument
55 this.bytes
[all...]
/lucene-3.6.0/lucene/test-framework/src/java/org/apache/lucene/analysis/
H A DMockFixedLengthPayloadFilter.java32 private final byte[] bytes; field in class:MockFixedLengthPayloadFilter
38 this.bytes = new byte[length];
39 this.payload = new Payload(bytes);
45 random.nextBytes(bytes);
H A DMockVariableLengthPayloadFilter.java34 private final byte[] bytes = new byte[MAXLENGTH]; field in class:MockVariableLengthPayloadFilter
40 this.payload = new Payload(bytes);
46 random.nextBytes(bytes);
47 payload.setData(bytes, 0, random.nextInt(MAXLENGTH));
/lucene-3.6.0/lucene/test-framework/src/java/org/apache/lucene/index/
H A DMockIndexInput.java32 public MockIndexInput(byte[] bytes) { argument
34 buffer = bytes;
35 length = bytes.length;
/lucene-3.6.0/lucene/backwards/src/test-framework/java/org/apache/lucene/analysis/
H A DMockFixedLengthPayloadFilter.java29 private final byte[] bytes; field in class:MockFixedLengthPayloadFilter
35 this.bytes = new byte[length];
36 this.payload = new Payload(bytes);
42 random.nextBytes(bytes);
H A DMockVariableLengthPayloadFilter.java31 private final byte[] bytes = new byte[MAXLENGTH]; field in class:MockVariableLengthPayloadFilter
37 this.payload = new Payload(bytes);
43 random.nextBytes(bytes);
44 payload.setData(bytes, 0, random.nextInt(MAXLENGTH));
/lucene-3.6.0/lucene/backwards/src/test-framework/java/org/apache/lucene/index/
H A DMockIndexInput.java27 public MockIndexInput(byte[] bytes) { argument
29 buffer = bytes;
30 length = bytes.length;
/lucene-3.6.0/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/payloads/
H A DPayloadHelper.java47 * @param bytes
52 public static float decodeFloat(byte [] bytes){ argument
53 return decodeFloat(bytes, 0);
59 * @param bytes The bytes to decode
65 public static final float decodeFloat(byte [] bytes, int offset){ argument
67 return Float.intBitsToFloat(decodeInt(bytes, offset));
70 public static final int decodeInt(byte [] bytes, int offset){ argument
71 return ((bytes[offset] & 0xFF) << 24) | ((bytes[offse
[all...]
/lucene-3.6.0/lucene/contrib/facet/src/java/org/apache/lucene/util/
H A DVint8.java26 * Variable-length encoding of 32-bit integers, into 8-bit bytes. A number is encoded as follows:
31 * bytes, each byte's
42 * three Vint8 bytes. Left-zero-pad it to a multiple of 7 bits, then split it into chunks of 7
47 * and positive numbers with more than 28 significant bits, encoding requires 5 bytes; this
62 * of bytes processed.
85 * Returns the number of bytes needed to encode {@code number}.
87 * @return The number of bytes needed to encode {@code number}.
104 * The maximum number of bytes needed to encode a number using {@code Vint8}.
111 * @param out The output stream receiving the encoded bytes.
141 * hold the required number of bytes
185 decode(byte[] bytes, Position pos) argument
[all...]
/lucene-3.6.0/solr/core/src/test/org/apache/solr/handler/
H A DDocumentAnalysisRequestHandlerTest.java115 private final byte[] bytes; field in class:DocumentAnalysisRequestHandlerTest.ByteStream
117 public ByteStream(byte[] bytes, String contentType) { argument
118 this.bytes = bytes;
121 size = Long.valueOf(bytes.length);
126 return new ByteArrayInputStream(bytes);
/lucene-3.6.0/lucene/contrib/misc/src/java/org/apache/lucene/store/
H A DWindowsDirectory.cpp103 (JNIEnv *env, jclass ignored, jlong fd, jbyteArray bytes, jint offset, jint length, jlong pos)
111 if (bytes == NULL) {
112 throwException(env, "java/lang/NullPointerException", "bytes cannot be null");
120 env->SetByteArrayRegion(bytes, offset, numRead, (const jbyte *) buffer);
127 jbyte *buffer = env->GetByteArrayElements (bytes, NULL);
134 env->ReleaseByteArrayElements(bytes, buffer, numRead == 0 || numRead == -1 ? JNI_ABORT : 0);
156 * Returns the length in bytes of a file.
102 Java_org_apache_lucene_store_WindowsDirectory_read(JNIEnv *env, jclass ignored, jlong fd, jbyteArray bytes, jint offset, jint length, jlong pos) argument
H A DWindowsDirectory.java135 /** Reads data from a file at pos into bytes */
136 private static native int read(long fd, byte bytes[], int offset, int length, long pos) throws IOException; argument
/lucene-3.6.0/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/suggest/
H A DBytesRefList.java34 * copies of the appended bytes in a {@link ByteBlockPool}.
73 * @param bytes the bytes to append
74 * @return the ordinal of the appended bytes
76 public int append(BytesRef bytes) { argument
83 pool.copy(bytes);
85 currentOffset += bytes.length;
117 * Returns the number internally used bytes to hold the appended bytes in
120 * @return the number internally used bytes t
[all...]
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/index/
H A DPrefixCodedTerms.java41 /** @return size in bytes */
46 /** @return iterator over the bytes */
54 BytesRef bytes = new BytesRef(); field in class:PrefixCodedTerms.PrefixCodedTermsIterator
79 bytes.grow(prefix + suffix);
80 input.readBytes(bytes.bytes, prefix, suffix);
81 bytes.length = prefix + suffix;
82 term.set(field, bytes.utf8ToString());
117 output.writeBytes(scratch.bytes, scratch.offset + prefix, suffix);
141 if (term1.bytes[term
[all...]
H A DSegmentNorms.java49 // null until bytes is set
51 private byte[] bytes; field in class:SegmentNorms
100 if (bytes != null) {
103 bytes = null;
111 // Load bytes but do not cache them if they were not
113 public synchronized void bytes(byte[] bytesOut, int offset, int len) throws IOException { method in class:SegmentNorms
115 if (bytes != null) {
118 System.arraycopy(bytes, 0, bytesOut, offset, len);
123 origNorm.bytes(bytesOut, offset, len);
134 // Load & cache full bytes arra
135 public synchronized byte[] bytes() throws IOException { method in class:SegmentNorms
[all...]
H A DTermBuffer.java29 private boolean dirty; // true if text was set externally (ie not read via UTF8 bytes)
32 private UnicodeUtil.UTF8Result bytes = new UnicodeUtil.UTF8Result(); field in class:TermBuffer
73 // Fully convert all bytes since bytes is dirty
74 UnicodeUtil.UTF16toUTF8(text.result, 0, text.length, bytes);
75 bytes.setLength(totalLength);
76 input.readBytes(bytes.result, start, length);
77 UnicodeUtil.UTF8toUTF16(bytes.result, 0, totalLength, text);
80 // Incrementally convert only the UTF8 bytes that are new:
81 bytes
[all...]
/lucene-3.6.0/solr/core/src/java/org/apache/solr/handler/admin/
H A DSystemInfoHandler.java314 private static String humanReadableUnits(long bytes, DecimalFormat df) { argument
317 if (bytes / ONE_GB > 0) {
318 newSizeAndUnits = String.valueOf(df.format((float)bytes / ONE_GB)) + " GB";
319 } else if (bytes / ONE_MB > 0) {
320 newSizeAndUnits = String.valueOf(df.format((float)bytes / ONE_MB)) + " MB";
321 } else if (bytes / ONE_KB > 0) {
322 newSizeAndUnits = String.valueOf(df.format((float)bytes / ONE_KB)) + " KB";
324 newSizeAndUnits = String.valueOf(bytes) + " bytes";
/lucene-3.6.0/lucene/test-framework/src/java/org/apache/lucene/util/
H A DThrottledIndexOutput.java37 private final byte[] bytes = new byte[1]; field in class:ThrottledIndexOutput
104 bytes[0] = b;
105 writeBytes(bytes, 0, 1);
/lucene-3.6.0/lucene/backwards/src/test-framework/java/org/apache/lucene/util/
H A DThrottledIndexOutput.java34 private final byte[] bytes = new byte[1]; field in class:ThrottledIndexOutput
101 bytes[0] = b;
102 writeBytes(bytes, 0, 1);
/lucene-3.6.0/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/
H A DInstantiatedIndexReader.java270 public void norms(String field, byte[] bytes, int offset) throws IOException { argument
275 System.arraycopy(norms, 0, bytes, offset, norms.length);
/lucene-3.6.0/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/suggest/fst/
H A DSort.java31 * <li>(two bytes) length of the following byte array,
32 * <li>exactly the above count of bytes for the sequence to be sorted.
66 final int bytes; field in class:Sort.BufferSize
68 private BufferSize(long bytes) { argument
69 if (bytes > Integer.MAX_VALUE) {
71 + (Integer.MAX_VALUE / MB) + "mb max): " + bytes);
74 this.bytes = (int) bytes;
117 public final long bufferSize = ramBufferSize.bytes;
157 if (ramBufferSize.bytes < ABSOLUTE_MIN_SORT_BUFFER_SIZ
396 write(byte [] bytes) argument
400 write(byte [] bytes, int off, int len) argument
[all...]

Completed in 295 milliseconds

12