Searched refs:buf (Results 1 - 25 of 58) sorted by relevance

123

/lucene-3.6.0/solr/solrj/src/java/org/apache/solr/common/util/
H A DFastWriter.java31 protected final char[] buf; field in class:FastWriter
40 this.buf = tempBuffer;
54 if (pos >= buf.length) {
55 sink.write(buf,0,pos);
58 buf[pos++] = c;
63 if (pos >= buf.length) {
64 sink.write(buf,0,pos);
67 buf[pos++] = c;
73 int space = buf.length - pos;
75 System.arraycopy(cbuf, off, buf, po
[all...]
H A DFastOutputStream.java27 private final byte[] buf; field in class:FastOutputStream
39 this.buf = tempBuffer;
59 if (pos >= buf.length) {
60 out.write(buf);
64 buf[pos++] = b;
69 int space = buf.length - pos;
71 System.arraycopy(arr, off, buf, pos, len);
73 } else if (len<buf.length) {
75 System.arraycopy(arr, off, buf, pos, space);
76 out.write(buf);
[all...]
H A DFastInputStream.java27 private final byte[] buf; field in class:FastInputStream
39 this.buf = tempBuffer;
55 return buf[pos++] & 0xff;
63 return buf[pos++] & 0xff;
68 end = in.read(buf, 0, buf.length);
83 System.arraycopy(buf, pos, b, off, r);
90 if (len-r >= buf.length) {
102 System.arraycopy(buf, pos, b, off+r, toRead);
162 return buf[po
[all...]
/lucene-3.6.0/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/util/
H A DOpenStringBuilder.java24 protected char[] buf; field in class:OpenStringBuilder
32 buf = new char[size];
42 this.buf = arr;
46 public char[] getArray() { return buf; }
49 public int capacity() { return buf.length; }
69 return buf[index];
73 buf[index] = ch;
81 buf[len++] = b;
87 System.arraycopy(b, off, buf, this.len, len);
92 char newbuf[] = new char[Math.max(buf
[all...]
/lucene-3.6.0/solr/solrj/src/java/org/apache/noggit/
H A DCharArr.java43 protected char[] buf; field in class:CharArr
52 buf = new char[size];
62 this.buf = arr;
67 public char[] getArray() { return buf; }
72 public int capacity() { return buf.length; }
76 return buf[start+index];
80 return new CharArr(buf, this.start+start, this.start+end);
85 return buf[start++];
94 buf[end++] = b;
100 System.arraycopy(b, off, buf, en
[all...]
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/document/
H A DNumberTools.java85 StringBuilder buf = new StringBuilder(STR_SIZE);
88 buf.append(NEGATIVE_PREFIX);
91 buf.append(POSITIVE_PREFIX);
95 int padLen = STR_SIZE - num.length() - buf.length();
97 buf.append('0');
99 buf.append(num);
101 return buf.toString();
H A DCompressionTools.java56 final byte[] buf = new byte[1024];
58 int count = compressor.deflate(buf);
59 bos.write(buf, 0, count);
104 final byte[] buf = new byte[1024];
106 int count = decompressor.inflate(buf);
107 bos.write(buf, 0, count);
/lucene-3.6.0/solr/core/src/java/org/apache/solr/schema/
H A DBinaryField.java38 private String toBase64String(ByteBuffer buf) { argument
39 return Base64.byteArrayToBase64(buf.array(), buf.position(), buf.limit()-buf.position());
69 byte[] buf = null;
72 buf = (byte[]) val;
73 len = buf.length;
76 buf = byteBuf.array();
82 buf
[all...]
/lucene-3.6.0/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/
H A DTrecDocParser.java86 * strip tags from <code>buf</code>: each tag is replaced by a single blank.
87 * @return text obtained when stripping all tags from <code>buf</code> (Input StringBuilder is unmodified).
89 public static String stripTags(StringBuilder buf, int start) { argument
90 return stripTags(buf.substring(start),0);
97 public static String stripTags(String buf, int start) { argument
99 buf = buf.substring(0);
101 return buf.replaceAll("<[^>]*>", " ");
105 * Extract from <code>buf</code> the text of interest within specified tags
106 * @param buf entir
112 extract(StringBuilder buf, String startTag, String endTag, int maxPos, String noisePrefixes[]) argument
[all...]
/lucene-3.6.0/solr/core/src/test/org/apache/solr/request/
H A DJSONWriterTest.java54 StringWriter buf = new StringWriter();
58 w.write(buf, req, rsp);
59 assertEquals(buf.toString(), "{'data1':float('NaN'),'data2':-float('Inf'),'data3':float('Inf')}");
62 buf = new StringWriter();
63 w.write(buf, req, rsp);
64 assertEquals(buf.toString(), "{'data1'=>(0.0/0.0),'data2'=>-(1.0/0.0),'data3'=>(1.0/0.0)}");
67 buf = new StringWriter();
68 w.write(buf, req, rsp);
69 assertEquals(buf.toString(), "{\"data1\":\"NaN\",\"data2\":\"-Infinity\",\"data3\":\"Infinity\"}");
78 StringWriter buf
[all...]
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/
H A DTestTermAttributeImpl.java38 StringBuilder buf = new StringBuilder("ab");
41 char[] content = buf.toString().toCharArray();
43 assertEquals(buf.length(), t.termLength());
44 assertEquals(buf.toString(), t.term());
45 buf.append(buf.toString());
51 buf = new StringBuilder("ab");
54 String content = buf.toString();
58 buf.append(content);
64 buf
[all...]
H A DTestCharTermAttributeImpl.java44 StringBuilder buf = new StringBuilder("ab");
47 char[] content = buf.toString().toCharArray();
49 assertEquals(buf.length(), t.length());
50 assertEquals(buf.toString(), t.toString());
51 buf.append(buf.toString());
57 buf = new StringBuilder("ab");
60 t.setEmpty().append(buf);
61 assertEquals(buf.length(), t.length());
62 assertEquals(buf
[all...]
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/analysis/tokenattributes/
H A DTestTermAttributeImpl.java38 StringBuilder buf = new StringBuilder("ab");
41 char[] content = buf.toString().toCharArray();
43 assertEquals(buf.length(), t.termLength());
44 assertEquals(buf.toString(), t.term());
45 buf.append(buf.toString());
51 buf = new StringBuilder("ab");
54 String content = buf.toString();
58 buf.append(content);
64 buf
[all...]
H A DTestCharTermAttributeImpl.java44 StringBuilder buf = new StringBuilder("ab");
47 char[] content = buf.toString().toCharArray();
49 assertEquals(buf.length(), t.length());
50 assertEquals(buf.toString(), t.toString());
51 buf.append(buf.toString());
57 buf = new StringBuilder("ab");
60 t.setEmpty().append(buf);
61 assertEquals(buf.length(), t.length());
62 assertEquals(buf
[all...]
/lucene-3.6.0/solr/core/src/test/org/apache/solr/response/
H A DTestCSVResponseWriter.java140 StringWriter buf = new StringWriter();
141 w.write(buf, req, rsp);
142 assertEquals("id,foo_s\n1,hi\n2,\n", buf.toString());
146 buf = new StringWriter();
147 w.write(buf, req, rsp);
148 assertEquals("id,score,foo_s\n1,2.718,hi\n2,89.83,\n", buf.toString());
152 buf = new StringWriter();
153 w.write(buf, req, rsp);
157 buf.toString());
162 buf
[all...]
H A DTestPHPSerializedResponseWriter.java52 StringWriter buf = new StringWriter();
56 w.write(buf, req, rsp);
58 buf.toString());
68 StringWriter buf = new StringWriter();
101 w.write(buf, req, rsp);
103 buf.toString());
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/analysis/
H A DTestToken.java85 StringBuilder buf = new StringBuilder("ab");
88 char[] content = buf.toString().toCharArray();
90 assertEquals(buf.length(), t.termLength());
91 assertEquals(buf.toString(), t.term());
92 buf.append(buf.toString());
98 buf = new StringBuilder("ab");
101 String content = buf.toString();
105 buf.append(content);
111 buf
[all...]
H A DTestMappingCharFilter.java46 char[] buf = new char[10];
47 int len = cs.read(buf, 0, 10);
49 assertEquals( 'x', buf[0]) ;
50 len = cs.read(buf, 0, 10);
55 len = cs.read(buf, 0, 10);
57 assertEquals( 'x', buf[0]) ;
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/analysis/
H A DTestToken.java85 StringBuilder buf = new StringBuilder("ab");
88 char[] content = buf.toString().toCharArray();
90 assertEquals(buf.length(), t.termLength());
91 assertEquals(buf.toString(), t.term());
92 buf.append(buf.toString());
98 buf = new StringBuilder("ab");
101 String content = buf.toString();
105 buf.append(content);
111 buf
[all...]
H A DTestMappingCharFilter.java45 char[] buf = new char[10];
46 int len = cs.read(buf, 0, 10);
48 assertEquals( 'x', buf[0]) ;
49 len = cs.read(buf, 0, 10);
54 len = cs.read(buf, 0, 10);
56 assertEquals( 'x', buf[0]) ;
/lucene-3.6.0/lucene/contrib/misc/src/java/org/apache/lucene/store/
H A DNativePosixUtil.java37 public static native int posix_madvise(ByteBuffer buf, int advise) throws IOException; argument
38 public static native int madvise(ByteBuffer buf, int advise) throws IOException; argument
/lucene-3.6.0/solr/contrib/velocity/src/test/org/apache/solr/velocity/
H A DVelocityResponseWriterTest.java50 StringWriter buf = new StringWriter();
52 vrw.write(buf, req, rsp);
53 assertEquals("testing", buf.toString());
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/store/
H A DTestHugeRamFile.java40 byte buf[] = singleBuffers.get(Integer.valueOf(size));
41 if (buf==null) {
42 buf = new byte[size];
44 singleBuffers.put(Integer.valueOf(size),buf);
46 return buf;
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/store/
H A DTestHugeRamFile.java40 byte buf[] = singleBuffers.get(Integer.valueOf(size));
41 if (buf==null) {
42 buf = new byte[size];
44 singleBuffers.put(Integer.valueOf(size),buf);
46 return buf;
/lucene-3.6.0/lucene/contrib/facet/src/test/org/apache/lucene/facet/index/params/
H A DPerDimensionIndexingParamsTest.java47 char[] buf = new char[20];
48 int numchars = ifip.drillDownTermText(cp, buf);
51 buf, 0, numchars));

Completed in 168 milliseconds

123