public static StreamingPropertyValue create(InputStream inputStream, Class type, Long length) { return new DefaultStreamingPropertyValue(inputStream, type, length); }
public static StreamingPropertyValue create(InputStream inputStream, Class type) { return new DefaultStreamingPropertyValue(inputStream, type, null); }
public static StreamingPropertyValue create(InputStream inputStream, Class type, Long length) { return new DefaultStreamingPropertyValue(inputStream, type, length); }
public static StreamingPropertyValue create(InputStream inputStream, Class type) { return new DefaultStreamingPropertyValue(inputStream, type, null); }
public static StreamingPropertyValue create(String value) { InputStream data = new ByteArrayInputStream(value.getBytes()); return new DefaultStreamingPropertyValue(data, String.class); }
public static StreamingPropertyValue create(String value) { InputStream data = new ByteArrayInputStream(value.getBytes()); return new DefaultStreamingPropertyValue(data, String.class); }
@Test public void testStreamingPropertyValueRef() { StreamingPropertyValue spv = new DefaultStreamingPropertyValue(new ByteArrayInputStream("test".getBytes()), byte[].class, 4L) .searchIndex(true); StreamingPropertyValueRef streamingPropertyValueRef = new TestStreamingPropertyValueRef(spv); testValue( streamingPropertyValueRef, getStreamingPropertyValueRefBytes(), (givenValue, deserializedValue) -> { assertNotNull(deserializedValue); assertTrue(deserializedValue.isSearchIndex()); assertEquals(byte[].class, deserializedValue.getValueType()); } ); }
@Test public void testStreamingPropertyValueRef() { StreamingPropertyValue spv = new DefaultStreamingPropertyValue(new ByteArrayInputStream("test".getBytes()), byte[].class, 4L) .searchIndex(true); StreamingPropertyValueRef streamingPropertyValueRef = new TestStreamingPropertyValueRef(spv); testValue( streamingPropertyValueRef, getStreamingPropertyValueRefBytes(), (givenValue, deserializedValue) -> { assertNotNull(deserializedValue); assertTrue(deserializedValue.isSearchIndex()); assertEquals(byte[].class, deserializedValue.getValueType()); } ); }
@Test public void testStreamingPropertyValue() { StreamingPropertyValue spv = new DefaultStreamingPropertyValue(new ByteArrayInputStream("test".getBytes()), byte[].class, 4L) .searchIndex(true); testValue( spv, getStreamingPropertyValueBytes(), (givenValue, deserializedValue) -> { assertNotNull(deserializedValue); assertTrue(deserializedValue.isSearchIndex()); assertEquals(byte[].class, deserializedValue.getValueType()); assertEquals(4L, (long) deserializedValue.getLength()); } ); }
@Test public void testStreamingPropertyValue() { StreamingPropertyValue spv = new DefaultStreamingPropertyValue(new ByteArrayInputStream("test".getBytes()), byte[].class, 4L) .searchIndex(true); testValue( spv, getStreamingPropertyValueBytes(), (givenValue, deserializedValue) -> { assertNotNull(deserializedValue); assertTrue(deserializedValue.isSearchIndex()); assertEquals(byte[].class, deserializedValue.getValueType()); assertEquals(4L, (long) deserializedValue.getLength()); } ); }